[pypy-commit] pypy SpecialisedTuples: (antocuni, mwp) make sure that tuple in test_eq does not delegate
mwp
noreply at buildbot.pypy.org
Thu Nov 10 10:47:35 CET 2011
Author: Mark Pearse <mark.pearse at skynet.be>
Branch: SpecialisedTuples
Changeset: r49090:f77f1a2e16f8
Date: 2011-11-05 17:12 +0100
http://bitbucket.org/pypy/pypy/changeset/f77f1a2e16f8/
Log: (antocuni, mwp) make sure that tuple in test_eq does not delegate
diff --git a/pypy/objspace/std/specialisedtupleobject.py b/pypy/objspace/std/specialisedtupleobject.py
--- a/pypy/objspace/std/specialisedtupleobject.py
+++ b/pypy/objspace/std/specialisedtupleobject.py
@@ -139,10 +139,10 @@
def mul__ANY_SpecialisedTuple(space, w_times, w_tuple):
return mul_specialisedtuple_times(space, w_tuple, w_times)
-
+'''
def eq__SpecialisedTuple_SpecialisedTuple(space, w_tuple1, w_tuple2):
return w_tuple1.eq(space, w_tuple2)
-'''
+
def hash__SpecialisedTuple(space, w_tuple):
return w_tuple.hash(space)
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
@@ -84,12 +84,12 @@
assert (1,2,3)[0:2:1] == (1,2)
def test_eq(self):
- a = (1,2)
+ a = self.forbid_delegation((1,2))
b = (1,2)
assert a == b
-
+
c = (1,3,2)
- assert a != c
+ assert not a == c
def test_hash(self):
a = (1,2)
@@ -111,3 +111,4 @@
+
More information about the pypy-commit
mailing list