pysys.unit.pyunit module

Contains the test class used to run pyunit tests

class pysys.unit.pyunit.PyUnitTest(descriptor, outsubdir, runner)[source]

Bases: pysys.basetest.BaseTest

Class for running PyUnit tests (standard Python unittest module). The execute method will execute all the .py files, find all the unittest.TestCase classes within those files and run the test methods within them. A separate Python process will be spawned for each input test file. By default child Python processes will have the same PYTHONPATH as the python process which is running pysys. However, this can be changed by overriding the getPythonPath() method.

execute()[source]

Implementation of the execute() abstract method which simply calls executePyUnitTests()

executePyUnitTests()[source]

Run all the PyUnit tests in the Input directory.

getPythonPath()[source]

Override this method to return a sequence of paths to put at the beginning of the PYTHONPATH when running the PyUnit tests. See PyUnit_test_002 for an example of this.