From 62c62438ff05d7363be5f9f711d4f1e2f1a5f536 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Sun, 25 Aug 2002 17:49:04 +0000 Subject: [PATCH] Simplified construction of the test suite. --- Lib/test/test_sets.py | 44 ++++++++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git a/Lib/test/test_sets.py b/Lib/test/test_sets.py index 068b7257d4..7b135fff7b 100644 --- a/Lib/test/test_sets.py +++ b/Lib/test/test_sets.py @@ -576,27 +576,29 @@ class TestCopyingNested(TestCopying): def makeAllTests(): suite = unittest.TestSuite() - suite.addTest(unittest.makeSuite(TestSetOfSets)) - suite.addTest(unittest.makeSuite(TestBasicOpsEmpty)) - suite.addTest(unittest.makeSuite(TestBasicOpsSingleton)) - suite.addTest(unittest.makeSuite(TestBasicOpsTuple)) - suite.addTest(unittest.makeSuite(TestBasicOpsTriple)) - suite.addTest(unittest.makeSuite(TestBinaryOps)) - suite.addTest(unittest.makeSuite(TestUpdateOps)) - suite.addTest(unittest.makeSuite(TestMutate)) - suite.addTest(unittest.makeSuite(TestSubsetEqualEmpty)) - suite.addTest(unittest.makeSuite(TestSubsetEqualNonEmpty)) - suite.addTest(unittest.makeSuite(TestSubsetEmptyNonEmpty)) - suite.addTest(unittest.makeSuite(TestSubsetPartial)) - suite.addTest(unittest.makeSuite(TestSubsetNonOverlap)) - suite.addTest(unittest.makeSuite(TestOnlySetsNumeric)) - suite.addTest(unittest.makeSuite(TestOnlySetsDict)) - suite.addTest(unittest.makeSuite(TestOnlySetsOperator)) - suite.addTest(unittest.makeSuite(TestCopyingEmpty)) - suite.addTest(unittest.makeSuite(TestCopyingSingleton)) - suite.addTest(unittest.makeSuite(TestCopyingTriple)) - suite.addTest(unittest.makeSuite(TestCopyingTuple)) - suite.addTest(unittest.makeSuite(TestCopyingNested)) + for klass in (TestSetOfSets, + TestBasicOpsEmpty, + TestBasicOpsSingleton, + TestBasicOpsTuple, + TestBasicOpsTriple, + TestBinaryOps, + TestUpdateOps, + TestMutate, + TestSubsetEqualEmpty, + TestSubsetEqualNonEmpty, + TestSubsetEmptyNonEmpty, + TestSubsetPartial, + TestSubsetNonOverlap, + TestOnlySetsNumeric, + TestOnlySetsDict, + TestOnlySetsOperator, + TestCopyingEmpty, + TestCopyingSingleton, + TestCopyingTriple, + TestCopyingTuple, + TestCopyingNested, + ): + suite.addTest(unittest.makeSuite(klass)) return suite #------------------------------------------------------------------------------ -- 2.40.0