Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r85836:14adc02034c8
Date: 2016-07-24 11:38 +0200
http://bitbucket.org/pypy/pypy/changeset/14adc02034c8/

Log:    Fix a few issues with hash(-1)==-2.

diff --git a/lib-python/2.7/test/test_hash.py b/lib-python/2.7/test/test_hash.py
--- a/lib-python/2.7/test/test_hash.py
+++ b/lib-python/2.7/test/test_hash.py
@@ -174,7 +174,7 @@
 
 class StringlikeHashRandomizationTests(HashRandomizationTests):
     if check_impl_detail(pypy=True):
-        EMPTY_STRING_HASH = -1
+        EMPTY_STRING_HASH = -2
     else:
         EMPTY_STRING_HASH = 0
 
diff --git a/pypy/module/cpyext/test/test_object.py 
b/pypy/module/cpyext/test/test_object.py
--- a/pypy/module/cpyext/test/test_object.py
+++ b/pypy/module/cpyext/test/test_object.py
@@ -168,7 +168,7 @@
 
     def test_hash(self, space, api):
         assert api.PyObject_Hash(space.wrap(72)) == 72
-        assert api.PyObject_Hash(space.wrap(-1)) == -1
+        assert api.PyObject_Hash(space.wrap(-1)) == -2
         assert (api.PyObject_Hash(space.wrap([])) == -1 and
             api.PyErr_Occurred() is space.w_TypeError)
         api.PyErr_Clear()
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to