[pypy-commit] pypy py3k: the fact that complex.__lt__ & co. returns NotImplemented is an impl detail

antocuni noreply at buildbot.pypy.org
Thu Oct 18 14:23:42 CEST 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r58207:8617a5ed3187
Date: 2012-10-18 12:06 +0200
http://bitbucket.org/pypy/pypy/changeset/8617a5ed3187/

Log:	the fact that complex.__lt__ & co. returns NotImplemented is an impl
	detail

diff --git a/lib-python/3.2/test/test_complex.py b/lib-python/3.2/test/test_complex.py
--- a/lib-python/3.2/test/test_complex.py
+++ b/lib-python/3.2/test/test_complex.py
@@ -123,10 +123,11 @@
             self.assertIs(complex.__ne__(f+0j, f), False)
             self.assertIs(complex.__eq__(complex(f, f), f), False)
             self.assertIs(complex.__ne__(complex(f, f), f), True)
-        self.assertIs(complex.__lt__(1+1j, 2+2j), NotImplemented)
-        self.assertIs(complex.__le__(1+1j, 2+2j), NotImplemented)
-        self.assertIs(complex.__gt__(1+1j, 2+2j), NotImplemented)
-        self.assertIs(complex.__ge__(1+1j, 2+2j), NotImplemented)
+        if support.check_impl_detail(pypy=False):
+            self.assertIs(complex.__lt__(1+1j, 2+2j), NotImplemented)
+            self.assertIs(complex.__le__(1+1j, 2+2j), NotImplemented)
+            self.assertIs(complex.__gt__(1+1j, 2+2j), NotImplemented)
+            self.assertIs(complex.__ge__(1+1j, 2+2j), NotImplemented)
         self.assertRaises(TypeError, operator.lt, 1+1j, 2+2j)
         self.assertRaises(TypeError, operator.le, 1+1j, 2+2j)
         self.assertRaises(TypeError, operator.gt, 1+1j, 2+2j)


More information about the pypy-commit mailing list