From: Guido van Rossum Date: Wed, 25 Feb 1998 17:51:50 +0000 (+0000) Subject: Add test for core dump -- make sure it doesn't come back! X-Git-Tag: v1.5.1~570 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d151d34ebd9f2600b7f9fa5bcb2fa8a59ce7439d;p=thirdparty%2FPython%2Fcpython.git Add test for core dump -- make sure it doesn't come back! --- diff --git a/Lib/test/test_types.py b/Lib/test/test_types.py index 7cca131c7e21..6be66ca17c41 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 = {}