diff --git a/doc/workflow/examples/test_example.py b/doc/workflow/examples/test_example.py index 7cbe76e..eb70b45 100644 --- a/doc/workflow/examples/test_example.py +++ b/doc/workflow/examples/test_example.py @@ -12,13 +12,7 @@ def filter(line): return 'Running' in line or "IGNORE" in line or line.startswith('usage:') or 'Sub-commands' in line class Test(unittest.TestCase): - - def setUp(self): - self._path = os.environ['PATH'] - sys.path.insert(0, sys.executable) - - def tearDown(self): - os.environ['PATH'] = self._path + pass # Find all example*.py files, and use them to define baseline tests for file in glob.glob(datadir+'example*.py'): @@ -42,4 +36,9 @@ def tearDown(self): # Execute the tests if __name__ == '__main__': + _path = os.environ['PATH'] + sys.path.insert(0, sys.executable) + unittest.main() + + os.environ['PATH'] = _path