summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_descr.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py
index e9a5057475..3616642a2f 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: