diff options
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r-- | Lib/test/test_weakref.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py index fa12a6e..5dfa6ce 100644 --- a/Lib/test/test_weakref.py +++ b/Lib/test/test_weakref.py @@ -2,7 +2,7 @@ import sys import unittest import weakref -from test_support import run_unittest +import test_support class C: @@ -434,5 +434,13 @@ class MappingTestCase(TestBase): self.assert_(d.items() == [('something else', o2)]) -run_unittest(ReferencesTestCase) -run_unittest(MappingTestCase) +def test_main(): + loader = unittest.TestLoader() + suite = unittest.TestSuite() + suite.addTest(loader.loadTestsFromTestCase(ReferencesTestCase)) + suite.addTest(loader.loadTestsFromTestCase(MappingTestCase)) + test_support.run_suite(suite) + + +if __name__ == "__main__": + test_main() |