]> granicus.if.org Git - python/commitdiff
Fix an occurrence of cmp that was missed in r69025
authorMark Dickinson <dickinsm@gmail.com>
Tue, 27 Jan 2009 20:27:05 +0000 (20:27 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Tue, 27 Jan 2009 20:27:05 +0000 (20:27 +0000)
Lib/unittest.py

index ffb8a6ce86d93978bb032c109effee87a094d5fa..aa6eb6580d52224618c5c720f58aaa6b122aaa79 100644 (file)
@@ -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)
 
 
 ##############################################################################