Jelajahi Sumber

When there are no test cases given, set test filename to None.

Sander Mathijs van Veen 14 tahun lalu
induk
melakukan
39804c23b6
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      runner.py

+ 1 - 1
runner.py

@@ -146,7 +146,7 @@ def main(tests, verbose=0, color=True):
     # Create the text runner and execute the tests.
     runner = TextTestRunner(verbosity=verbose, color=color)
     suite = unittest.TestSuite(testcases)
-    suite.filename = testfile
+    suite.filename = testfile if tests else None
 
     result = runner.run(suite)