summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_types.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index ec0f841..0a43de3 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -152,6 +152,9 @@ a.reverse()
if a <> [2,1,0,-1,-2]: raise TestFailed, 'list reverse'
a.sort()
if a <> [-2,-1,0,1,2]: raise TestFailed, 'list sort'
+def revcmp(a, b): return cmp(b, a)
+a.sort(revcmp)
+if a <> [2,1,0,-1,-2]: raise TestFailed, 'list sort with cmp func'
print '6.6 Mappings == Dictionaries'
d = {}