From c429a83cf854cb4a1a289d44ec75d2d9928d8539 Mon Sep 17 00:00:00 2001 From: Mark Dickinson Date: Tue, 27 Jan 2009 20:27:05 +0000 Subject: [PATCH] Fix an occurrence of cmp that was missed in r69025 --- Lib/unittest.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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) ############################################################################## -- 2.40.0