[pypy-commit] pypy default: a failing test

alex_gaynor noreply at buildbot.pypy.org
Tue Nov 15 08:21:48 CET 2011


Author: Alex Gaynor <alex.gaynor at gmail.com>
Branch: 
Changeset: r49429:7a416e643dc0
Date: 2011-11-15 02:20 -0500
http://bitbucket.org/pypy/pypy/changeset/7a416e643dc0/

Log:	a 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
@@ -180,6 +180,22 @@
         res2 = self.interpret(f, [27, 12])
         assert res1 != res2
 
+    def test_constant_tuple_hash_str(self):
+        def f(i):
+            d = {}
+            if i:
+                t = (None, "abc")
+                d[t] = 3
+            else:
+                t = ("abc", None)
+                d[t] = 4
+            return d[t]
+
+        res = self.interpret(f, [0])
+        assert res == 4
+        res = self.interpret(f, [1])
+        assert res == 3
+
     def test_tuple_to_list(self):
         def f(i, j):
             return list((i, j))


More information about the pypy-commit mailing list