From: Benjamin Peterson Date: Wed, 16 Dec 2009 04:27:27 +0000 (+0000) Subject: backport change from trunk X-Git-Tag: v2.6.5rc1~269 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4b32dd77d40193a017c40d1851a8510ca1cebcf4;p=thirdparty%2FPython%2Fcpython.git backport change from trunk --- diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index e9a505747513..3616642a2ff5 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1776,6 +1776,8 @@ order (MRO) for bases """ # Safety test for __cmp__ def unsafecmp(a, b): + if not hasattr(a.__class__, "__cmp__"): + return try: a.__class__.__cmp__(a, b) except TypeError: