@@ -1470,39 +1470,6 @@ def test(self): pass
14701470 def reverse_three_way_cmp (a , b ):
14711471 return unittest .util .three_way_cmp (b , a )
14721472
1473- def test_getTestCaseNames (self ):
1474- with self .assertWarns (DeprecationWarning ) as w :
1475- tests = unittest .getTestCaseNames (self .MyTestCase ,
1476- prefix = 'check' , sortUsing = self .reverse_three_way_cmp ,
1477- testNamePatterns = None )
1478- self .assertEqual (w .filename , __file__ )
1479- self .assertEqual (tests , ['check_2' , 'check_1' ])
1480-
1481- def test_makeSuite (self ):
1482- with self .assertWarns (DeprecationWarning ) as w :
1483- suite = unittest .makeSuite (self .MyTestCase ,
1484- prefix = 'check' , sortUsing = self .reverse_three_way_cmp ,
1485- suiteClass = self .MyTestSuite )
1486- self .assertEqual (w .filename , __file__ )
1487- self .assertIsInstance (suite , self .MyTestSuite )
1488- expected = self .MyTestSuite ([self .MyTestCase ('check_2' ),
1489- self .MyTestCase ('check_1' )])
1490- self .assertEqual (suite , expected )
1491-
1492- def test_findTestCases (self ):
1493- m = types .ModuleType ('m' )
1494- m .testcase_1 = self .MyTestCase
1495-
1496- with self .assertWarns (DeprecationWarning ) as w :
1497- suite = unittest .findTestCases (m ,
1498- prefix = 'check' , sortUsing = self .reverse_three_way_cmp ,
1499- suiteClass = self .MyTestSuite )
1500- self .assertEqual (w .filename , __file__ )
1501- self .assertIsInstance (suite , self .MyTestSuite )
1502- expected = [self .MyTestSuite ([self .MyTestCase ('check_2' ),
1503- self .MyTestCase ('check_1' )])]
1504- self .assertEqual (list (suite ), expected )
1505-
15061473
15071474if __name__ == "__main__" :
15081475 unittest .main ()
0 commit comments