diff options
Diffstat (limited to 'zenmap/test/run_tests.py')
-rw-r--r-- | zenmap/test/run_tests.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zenmap/test/run_tests.py b/zenmap/test/run_tests.py new file mode 100644 index 0000000..486ffab --- /dev/null +++ b/zenmap/test/run_tests.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import unittest + +if __name__ == "__main__": + import sys + import glob + import os + if not hasattr(unittest.defaultTestLoader, "discover"): + print("Python unittest discovery missing. Requires Python 3.0 or newer.") # noqa + sys.exit(0) + + os.chdir("..") + suite = unittest.defaultTestLoader.discover( + start_dir=glob.glob("build/lib*")[0], + pattern="*.py" + ) + unittest.TextTestRunner().run(suite) |