diff --git a/tf_keras/testing_infra/test_combinations_test.py b/tf_keras/testing_infra/test_combinations_test.py index 65008a68d..9012d7836 100644 --- a/tf_keras/testing_infra/test_combinations_test.py +++ b/tf_keras/testing_infra/test_combinations_test.py @@ -58,7 +58,7 @@ def testBody(self): ], ) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) self.assertLen(test_params, 6) @@ -72,7 +72,7 @@ def testBody(self): ], ) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) self.assertLen(test_params, 4) @@ -125,7 +125,7 @@ def testBody(self): self.assertNotIsInstance(models[1], keras_models.Sequential) self.assertIsInstance(models[2], keras_models.Sequential) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -155,7 +155,7 @@ def testBody(self, arg): (mode, should_run_eagerly, test_utils.get_model_type()) ) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -211,7 +211,7 @@ def testBody(self): self.assertNotIsInstance(models[1], keras.models.Sequential) self.assertIsInstance(models[2], keras.models.Sequential) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -267,7 +267,7 @@ def testBody(self, with_brackets): self.assertNotIsInstance(models[1], keras.models.Sequential) self.assertIsInstance(models[2], keras.models.Sequential) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -305,7 +305,7 @@ def testBody(self): self.assertNotIsInstance(models[0], keras.models.Sequential) self.assertNotIsInstance(models[1], keras.models.Sequential) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -341,7 +341,7 @@ def testBody(self): self.assertFalse(models[0]._is_graph_network) self.assertNotIsInstance(models[0], keras.models.Sequential) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -377,7 +377,7 @@ def testBody(self): ], ) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) self.assertLen(l, 6) @@ -391,7 +391,7 @@ def testBody(self): ], ) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) self.assertLen(l, 4) @@ -446,7 +446,7 @@ def testBody(self, with_brackets): self.assertLen(l, len(expected_combinations)) self.assertEqual(set(l), expected_combinations) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -532,7 +532,7 @@ def testBody(self): self.assertLen(l, len(expected_combinations)) self.assertEqual(set(l), expected_combinations) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -588,7 +588,7 @@ def testBody(self): self.assertLen(l, len(expected_combinations)) self.assertEqual(set(l), expected_combinations) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -647,7 +647,7 @@ def testBody(self, arg): self.assertLen(l, len(expected_combinations)) self.assertEqual(set(l), expected_combinations) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res) @@ -706,7 +706,7 @@ def testBody(self, arg): self.assertLen(l, len(expected_combinations)) self.assertEqual(set(l), expected_combinations) - ts = unittest.makeSuite(ExampleTest) + ts = unittest.TestLoader().loadTestsFromTestCase(ExampleTest) res = unittest.TestResult() ts.run(res)