From: Mark Dickinson Date: Tue, 27 Jan 2009 20:27:05 +0000 (+0000) Subject: Fix an occurrence of cmp that was missed in r69025 X-Git-Tag: v3.1a1~366 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c429a83cf854cb4a1a289d44ec75d2d9928d8539;p=python Fix an occurrence of cmp that was missed in r69025 --- diff --git a/Lib/unittest.py b/Lib/unittest.py index ffb8a6ce86..aa6eb6580d 100644 --- a/Lib/unittest.py +++ b/Lib/unittest.py @@ -656,14 +656,18 @@ def _makeLoader(prefix, sortUsing, suiteClass=None): if suiteClass: loader.suiteClass = suiteClass return loader -def getTestCaseNames(testCaseClass, prefix, sortUsing=cmp): +def getTestCaseNames(testCaseClass, prefix, sortUsing=three_way_cmp): return _makeLoader(prefix, sortUsing).getTestCaseNames(testCaseClass) -def makeSuite(testCaseClass, prefix='test', sortUsing=cmp, suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase(testCaseClass) +def makeSuite(testCaseClass, prefix='test', sortUsing=three_way_cmp, + suiteClass=TestSuite): + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromTestCase( + testCaseClass) -def findTestCases(module, prefix='test', sortUsing=cmp, suiteClass=TestSuite): - return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule(module) +def findTestCases(module, prefix='test', sortUsing=three_way_cmp, + suiteClass=TestSuite): + return _makeLoader(prefix, sortUsing, suiteClass).loadTestsFromModule( + module) ##############################################################################