aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/test/test_weakref.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r--Lib/test/test_weakref.py17
1 files changed, 5 insertions, 12 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 5a3e59c3e9e..3bdc86d6923 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -1,5 +1,6 @@
import gc
import sys
+import doctest
import unittest
import collections
import weakref
@@ -2233,18 +2234,10 @@ OK
__test__ = {'libreftest' : libreftest}
-def test_main():
- support.run_unittest(
- ReferencesTestCase,
- WeakMethodTestCase,
- MappingTestCase,
- WeakValueDictionaryTestCase,
- WeakKeyDictionaryTestCase,
- SubclassableWeakrefTestCase,
- FinalizeTestCase,
- )
- support.run_doctest(sys.modules[__name__])
+def load_tests(loader, tests, pattern):
+ tests.addTest(doctest.DocTestSuite())
+ return tests
if __name__ == "__main__":
- test_main()
+ unittest.main()