1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Update run_tests.py for setuptools build

This commit is contained in:
dmiller
2024-04-11 21:34:11 +00:00
parent c4a4e0db45
commit a566fc1b8d

View File

@@ -4,7 +4,6 @@ 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
@@ -12,7 +11,7 @@ if __name__ == "__main__":
os.chdir("..")
suite = unittest.defaultTestLoader.discover(
start_dir=glob.glob("build/lib*")[0],
start_dir=".",
pattern="*.py"
)
unittest.TextTestRunner().run(suite)