unittests/avocado/sysinfo_unittest.py: Set exec flag

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: Make base test class inherit from unittest.TestCase

Compatibility among avocado and regular python unittests
is one of the goals we want to accomplish with making
test cases inherit from the base python unittest TestCase
class. Also, we get the benefit of interoperating with
other known python test frameworks, such as nose.

In order to do that, we make the Test() class to inherit
from the base TestCase class, then move the _run_test_instance
method to the test class (as it makes a lot more sense
there anyway), and turn it into the default runTest() method.

With this, avocado tests gain automatically all features
of the unittest.TestCase() class, namely, the assert
methods.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: unittest.TestCase compatibility

Make sure avocado tests can be loaded as unittests.
This patch accomplishes it by reducing the amount of
optional parameters accepted by the class.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: Complement compatibility with unittest.TestCase()

Make avocado.test.Test() to be compatible with unittest.TestCase(),
by making it take the methodName param, that will be largely for
the sake of compatibility. With this, we can run avocado tests
with unittest.main() and nosetests just fine:

$ nosetests tests/sleeptest/sleeptest.py
.
----------------------------------------------------------------------
Ran 1 test in 1.096s

OK

$ nosetests tests/failtest/failtest.py
E
======================================================================
ERROR: Run test method, for compatibility with unittest.TestCase.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/lmr/Code/avocado/avocado/test.py", line 180, in runTest
    self.action()
  File "/home/lmr/Code/avocado/tests/failtest/failtest.py", line 33, in
action
    raise exceptions.TestFail('This test is supposed to fail')
TestFail: This test is supposed to fail

----------------------------------------------------------------------
Ran 1 test in 0.088s

FAILED (errors=1)

In order to do this, the code in runTest was split to
an unhandled method, to be used by nosetests and the
unittest runner, and another one, to be used inside
avocado (run_avocado).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.test: Re-introduce Test() name constructor param

In order to keep the behavior of dropin tests, reintroduce
the param name to the Test() constructor, that'll allow
us to have pretty names for them once again.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
docs/source/conf.py: Use the read the docs theme if available

It is useful to build avocado docs locally and have them
look mostly identical to the reference documentation,
hosted in read the docs. The theme can be installed using
pip with:

pip install sphinx_rtd_theme

And if not present, the build should gracefully
degrade to the sphinx default.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
README.rst: Add references to the online docs

Also, add instructions to build the docs for offline
viewing.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #26 from avocado-framework/sphinx-theme

HTML documentation theme and README.rst improvements
Merge pull request #25 from avocado-framework/test-inherits-unittest

Experiment - make avocado base Test() class inherit from unittest.TestCase()
plugins.xunit: Add class XmlResult.

Improvements for using xUnit  with Jenkins (Junit).
Now the actual XML result is handled in class XmlResult.
Also minor fix (cosmetics) in tests.failtest.

Signed-off-by: Ruda Moura <rmoura@redhat.com>