Scripts related to running unit tests, based on testoob. Part of the ETSDevTools project of the Enthought Tool Suite.
These scripts also allow running test suites in separate processes and aggregating the results.
Tools for having doctest and unittest work together more nicely.
Eclipse’s PyDev plugin will run your unittest files for you very nicely. The doctest_for_module function allows you to easily run the doctest for a module along side your standard unit tests within Eclipse.
Create a TestCase from a module’s doctests that will be run by the standard unittest.main().
Example tests/test_foo.py:
import unittest
import foo
from traits.testing.api import doctest_for_module
class FooTestCase(unittest.TestCase):
...
class FooDocTest(doctest_for_module(foo)):
pass
if __name__ == "__main__":
# This will run and report both FooTestCase and the doctests in
# module foo.
unittest.main()
Alternatively, you can say:
FooDocTest = doctest_for_module(foo)
instead of:
class FooDocTest(doctest_for_module(foo)):
pass
Non-standard functions for the ‘nose’ testing framework.
Stub replacement for marking a unit test deprecated in the absence of ‘nose’.