summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xtests/run-tests.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-tests.py b/tests/run-tests.py
index 38f1161360..50adb6b4d3 100755
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -1004,6 +1004,16 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
test_count.increment()
+ # Print a note if this looks like it might have been a misfired unittest
+ if not uses_unittest and not test_passed:
+ with open(test_file, "r") as f:
+ if any(re.match("^import.+unittest", l) for l in f.readlines()):
+ print(
+ "NOTE: {} may be a unittest that doesn't run unittest.main()".format(
+ test_file
+ )
+ )
+
if pyb:
num_threads = 1