summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-02-25 17:51:50 (GMT)
committerGuido van Rossum <guido@python.org>1998-02-25 17:51:50 (GMT)
commitd151d34ebd9f2600b7f9fa5bcb2fa8a59ce7439d (patch)
tree8952e1541abb6fcc5800279f4774e1febb8cd392 /Lib
parentc88aa3594f49f3c2496aacd6970863cecafb1895 (diff)
downloadcpython-d151d34ebd9f2600b7f9fa5bcb2fa8a59ce7439d.zip
cpython-d151d34ebd9f2600b7f9fa5bcb2fa8a59ce7439d.tar.gz
cpython-d151d34ebd9f2600b7f9fa5bcb2fa8a59ce7439d.tar.bz2
Add test for core dump -- make sure it doesn't come back!
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_types.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py
index 7cca131..6be66ca 100644
--- a/Lib/test/test_types.py
+++ b/Lib/test/test_types.py
@@ -161,6 +161,11 @@ 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'
+# The following dumps core in unpatched Python 1.5:
+def myComparison(x,y):
+ return cmp(x%3, y%7)
+z = range(12)
+z.sort(myComparison)
print '6.6 Mappings == Dictionaries'
d = {}