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:
Serhiy Storchaka 2021-09-13 10:49:53 +03:00 committed by GitHub
parent c78d5ca380
commit 851811f577
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
49 changed files with 80 additions and 93 deletions

View file

@ -521,8 +521,8 @@ class MetadataTestCase(support.TempdirManager, support.EnvironGuard,
def test_suite():
suite = unittest.TestSuite()
suite.addTest(unittest.makeSuite(DistributionTestCase))
suite.addTest(unittest.makeSuite(MetadataTestCase))
suite.addTest(unittest.TestLoader().loadTestsFromTestCase(DistributionTestCase))
suite.addTest(unittest.TestLoader().loadTestsFromTestCase(MetadataTestCase))
return suite
if __name__ == "__main__":