[pypy-svn] r59539 - pypy/trunk/lib-python/modified-2.5.2/test
arigo at codespeak.net
arigo at codespeak.net
Thu Oct 30 12:19:18 CET 2008
Author: arigo
Date: Thu Oct 30 12:19:17 2008
New Revision: 59539
Modified:
pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
Log:
Skip this (pretty much CPython internal) test if there is no __cmp__.
Modified: pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py
==============================================================================
--- pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py (original)
+++ pypy/trunk/lib-python/modified-2.5.2/test/test_descr.py Thu Oct 30 12:19:17 2008
@@ -1967,6 +1967,9 @@
verify(10 not in p10)
# Safety test for __cmp__
def unsafecmp(a, b):
+ if not hasattr(a, '__cmp__'):
+ return # some types don't have a __cmp__ any more in CPython,
+ # or never had e.g. in PyPy
try:
a.__class__.__cmp__(a, b)
except TypeError:
More information about the Pypy-commit
mailing list