[pypy-commit] pypy default: simplify failing test
alex_gaynor
noreply at buildbot.pypy.org
Tue Nov 15 08:39:25 CET 2011
Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch:
Changeset: r49431:bf8bf8a5810e
Date: 2011-11-15 02:39 -0500
http://bitbucket.org/pypy/pypy/changeset/bf8bf8a5810e/
Log: simplify failing test
diff --git a/pypy/rpython/test/test_rtuple.py b/pypy/rpython/test/test_rtuple.py
--- a/pypy/rpython/test/test_rtuple.py
+++ b/pypy/rpython/test/test_rtuple.py
@@ -181,20 +181,17 @@
assert res1 != res2
def test_constant_tuple_hash_str(self):
+ from pypy.rlib.objectmodel import compute_hash
def f(i):
- d = {}
if i:
t = (None, "abc")
- d[t] = 3
else:
t = ("abc", None)
- d[t] = 4
- return d[t]
+ return compute_hash(t)
- res = self.interpret(f, [0])
- assert res == 4
- res = self.interpret(f, [1])
- assert res == 3
+ res1 = self.interpret(f, [0])
+ res2 = self.interpret(f, [1])
+ assert res1 != res2
def test_tuple_to_list(self):
def f(i, j):
More information about the pypy-commit
mailing list