From: cfalcon <cf...@ce...> - 2015-11-24 08:13:23
|
The taurus testsuite applies the autodiscover in the taurus/lib getting all the existing test. The external directory, that is include in the root path, could include local installation of libraries used by Taurus. Taurus should not execute the unittests of the external libraries. The patch limits the taurus testsuite autodiscover in two directories: - taurus/lib/core - taurus/lib/qt --- lib/taurus/test/testsuite.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/taurus/test/testsuite.py b/lib/taurus/test/testsuite.py index 0cdcdef..c02890d 100644 --- a/lib/taurus/test/testsuite.py +++ b/lib/taurus/test/testsuite.py @@ -44,9 +44,13 @@ def run(disableLogger=True): # disable logging messages if disableLogger: taurus.disableLogOutput() - # discover all tests within the taurus/lib directory + # discover all tests within taurus/lib/core and taurus/lib/qt directories loader = unittest.defaultTestLoader - suite = loader.discover(os.path.dirname(taurus.__file__)) + main_path = os.path.dirname(taurus.__file__) + core_path = os.path.join(main_path, 'core') + qt_path = os.path.join(main_path, 'qt') + suite = loader.discover(core_path, top_level_dir=main_path) + suite.addTests(loader.discover(qt_path, top_level_dir=main_path)) # use the basic text test runner that outputs to sys.stderr runner = unittest.TextTestRunner(descriptions=True, verbosity=2) # run the test suite -- 2.4.0 |