[pypy-commit] pypy default: fix identity tests
cfbolz
pypy.commits at gmail.com
Sat Mar 5 17:42:46 EST 2016
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch:
Changeset: r82803:c7cc35224c29
Date: 2016-03-05 23:42 +0100
http://bitbucket.org/pypy/pypy/changeset/c7cc35224c29/
Log: fix identity tests
diff --git a/pypy/objspace/std/test/test_obj.py b/pypy/objspace/std/test/test_obj.py
--- a/pypy/objspace/std/test/test_obj.py
+++ b/pypy/objspace/std/test/test_obj.py
@@ -172,15 +172,15 @@
def test_id_on_primitives(self):
if self.cpython_apptest:
skip("cpython behaves differently")
- assert id(1) == (1 << 3) + 1
- assert id(1l) == (1 << 3) + 3
+ assert id(1) == (1 << 4) + 1
+ assert id(1l) == (1 << 4) + 3
class myint(int):
pass
assert id(myint(1)) != id(1)
assert id(1.0) & 7 == 5
assert id(-0.0) != id(0.0)
- assert hex(id(2.0)) == '0x20000000000000005L'
+ assert hex(id(2.0)) == '0x40000000000000005L'
assert id(0.0) == 5
def test_id_on_strs(self):
More information about the pypy-commit
mailing list