diff options
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/unittest.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py index 84520d8..d781354 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -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() |