[pypy-commit] pypy SpecialisedTuples: (antocuni, mwp) check eq delegates when necessary

mwp noreply at buildbot.pypy.org
Thu Nov 10 10:47:36 CET 2011


Author: Mark Pearse <mark.pearse at skynet.be>
Branch: SpecialisedTuples
Changeset: r49091:bf6c561e2cdd
Date: 2011-11-05 17:35 +0100
http://bitbucket.org/pypy/pypy/changeset/bf6c561e2cdd/

Log:	(antocuni, mwp) check eq delegates when necessary

diff --git a/pypy/objspace/std/test/test_specialisedtupleobject.py b/pypy/objspace/std/test/test_specialisedtupleobject.py
--- a/pypy/objspace/std/test/test_specialisedtupleobject.py
+++ b/pypy/objspace/std/test/test_specialisedtupleobject.py
@@ -88,8 +88,15 @@
         b = (1,2)
         assert a == b
         
-        c = (1,3,2)
-        assert not a == c
+    def test_eq_can_delegate(self):        
+        a = (1,2)
+        b = (1,3,2)
+        assert not a == b
+        
+        values = [2, 2L, 2.0, 1, 1L, 1.0]
+        for x in values:
+            for y in values:
+                assert ((1,2) == (x,y)) == (1 == x and 2 == y)
 
     def test_hash(self):
         a = (1,2)


More information about the pypy-commit mailing list