summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pdb.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2021-09-13 07:49:53 (GMT)
committerGitHub <noreply@github.com>2021-09-13 07:49:53 (GMT)
commit851811f5772c43f72f445e2ce1ac3ea9da951ae3 (patch)
tree4178e52377f5bfd4f9e94dc5261eb0a6e05ef6cc /Lib/test/test_pdb.py
parentc78d5ca3806d02e26f9f3fa92ff567f0805eac4c (diff)
downloadcpython-851811f5772c43f72f445e2ce1ac3ea9da951ae3.zip
cpython-851811f5772c43f72f445e2ce1ac3ea9da951ae3.tar.gz
cpython-851811f5772c43f72f445e2ce1ac3ea9da951ae3.tar.bz2
bpo-5846: Do not use obsolete unittest functions. (GH-28303)
Get rid of use of makeSuite() and findTestCases(). Also make test_math and test_threading_local discoverable.
Diffstat (limited to 'Lib/test/test_pdb.py')
-rw-r--r--Lib/test/test_pdb.py10
1 files changed, 3 insertions, 7 deletions
diff --git a/Lib/test/test_pdb.py b/Lib/test/test_pdb.py
index 5bb8069..4491129 100644
--- a/Lib/test/test_pdb.py
+++ b/Lib/test/test_pdb.py
@@ -1975,14 +1975,10 @@ class ChecklineTests(unittest.TestCase):
self.assertFalse(db.checkline(os_helper.TESTFN, lineno))
-def load_tests(*args):
+def load_tests(loader, tests, pattern):
from test import test_pdb
- suites = [
- unittest.makeSuite(PdbTestCase),
- unittest.makeSuite(ChecklineTests),
- doctest.DocTestSuite(test_pdb)
- ]
- return unittest.TestSuite(suites)
+ tests.addTest(doctest.DocTestSuite(test_pdb))
+ return tests
if __name__ == '__main__':