mirror of
https://github.com/nmap/nmap.git
synced 2026-11-28 10:30:14 +00:00
Merge 91328a5eb4 into 4568fbc1b8
This commit is contained in:
commit
41585c74ef
1 changed files with 3 additions and 2 deletions
|
|
@ -7,11 +7,12 @@ if __name__ == "__main__":
|
|||
import os
|
||||
if not hasattr(unittest.defaultTestLoader, "discover"):
|
||||
print("Python unittest discovery missing. Requires Python 3.0 or newer.") # noqa
|
||||
sys.exit(0)
|
||||
sys.exit(1)
|
||||
|
||||
os.chdir("..")
|
||||
suite = unittest.defaultTestLoader.discover(
|
||||
start_dir=".",
|
||||
pattern="*.py"
|
||||
)
|
||||
unittest.TextTestRunner().run(suite)
|
||||
result = unittest.TextTestRunner().run(suite)
|
||||
sys.exit(not result.wasSuccessful())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue