]> granicus.if.org Git - python/commitdiff
Fix to restore command line behaviour for test modules using unittest.main(). Regress...
authorMichael Foord <fuzzyman@voidspace.org.uk>
Tue, 12 May 2009 10:46:23 +0000 (10:46 +0000)
committerMichael Foord <fuzzyman@voidspace.org.uk>
Tue, 12 May 2009 10:46:23 +0000 (10:46 +0000)
Lib/unittest.py

index 84520d8616993b14aaa7d6c8c87e51804cc0770f..d781354ba4201290256d27b5338066dd0e72c30b 100644 (file)
@@ -1567,7 +1567,8 @@ Examples:
                 return
             if len(args) > 0:
                 self.testNames = args
-                self.module = None
+                if os.path.splitext(os.path.basename(__file__))[0] == 'unitest':
+                    self.module = None
             else:
                 self.testNames = (self.defaultTest,)
             self.createTests()