Author: [email protected]
Branch: ep2016sprint
Changeset: r85826:15315d8da6f5
Date: 2016-07-23 15:32 +0200
http://bitbucket.org/pypy/pypy/changeset/15315d8da6f5/

Log:    Issue #2346 : Hashing of -1 did not return -2 as cpython

diff --git a/pypy/objspace/test/test_descriptor.py 
b/pypy/objspace/test/test_descriptor.py
--- a/pypy/objspace/test/test_descriptor.py
+++ b/pypy/objspace/test/test_descriptor.py
@@ -147,9 +147,14 @@
             pass
         class mylong(long):
             pass
+        class myfloat(float):
+            pass
 
         assert hash(-1) == -2
         assert hash(-1L) == -2
+        assert hash(-1.0) == -2
+        assert hash(-1 + 0j) == -2
         assert hash(myint(-1)) == -2
         assert hash(mylong(-1)) == -2
+        assert hash(myfloat(-1.0)) == -2
 
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to