mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
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.
This commit is contained in:
parent
c78d5ca380
commit
851811f577
49 changed files with 80 additions and 93 deletions
|
@ -221,9 +221,8 @@ def load_tests(loader, tests, pattern):
|
|||
classes.append(type("TestCase-" + mod.__name__,
|
||||
(AnyDBMTestCase, unittest.TestCase),
|
||||
{'module': mod}))
|
||||
suites = [unittest.makeSuite(c) for c in classes]
|
||||
|
||||
tests.addTests(suites)
|
||||
for c in classes:
|
||||
tests.addTest(loader.loadTestsFromTestCase(c))
|
||||
return tests
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue