summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2009-01-27 20:27:05 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2009-01-27 20:27:05 (GMT)
commitc429a83cf854cb4a1a289d44ec75d2d9928d8539 (patch)
treec06c0cb6fbb9ec35997fff6605c677fdcd1a17d8
parenta56c467ac39ab1a6a2e9dc2fa41a9f573f989839 (diff)
downloadcpython-c429a83cf854cb4a1a289d44ec75d2d9928d8539.zip
cpython-c429a83cf854cb4a1a289d44ec75d2d9928d8539.tar.gz
cpython-c429a83cf854cb4a1a289d44ec75d2d9928d8539.tar.bz2
Fix an occurrence of cmp that was missed in r69025
-rw-r--r--Lib/unittest.py14
1 files changed, 9 insertions, 5 deletions
diff --git a/Lib/unittest.py b/Lib/unittest.py
index ffb8a6c..aa6eb65 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)
##############################################################################