1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-07 21:21:31 +00:00
Files
nmap/zenmap/test/run_tests.py
dmiller 24b26317c7 Merge #2088: Update Zenmap to Python 3 and PyGObject
Note: Ndiff build will be broken until subsequent changes are made.
Deprecation warnings will need to be addressed in future changes.
Closes #2088
2022-12-07 20:34:03 +00:00

19 lines
472 B
Python

#!/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 2.7 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)