[pypy-svn] r22902 - pypy/dist/pypy/rpython/lltypesystem/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Tue Jan 31 15:57:04 CET 2006
Author: cfbolz
Date: Tue Jan 31 15:54:06 2006
New Revision: 22902
Modified:
pypy/dist/pypy/rpython/lltypesystem/test/test_picklelltype.py
Log:
add another test for correct hashes of unpickled lltypes
Modified: pypy/dist/pypy/rpython/lltypesystem/test/test_picklelltype.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/test/test_picklelltype.py (original)
+++ pypy/dist/pypy/rpython/lltypesystem/test/test_picklelltype.py Tue Jan 31 15:54:06 2006
@@ -216,7 +216,7 @@
assert not p10
-def DONOTtest_hash():
+def test_hash():
S = ForwardReference()
S.become(Struct('S', ('p', Ptr(S))))
assert S == S
@@ -224,6 +224,8 @@
S1 = Struct('S', ('p', Ptr(S)))
assert S1 == S
assert S == S1
+ r_S = pickle.loads(pickle.dumps(S))
+ r_S1 = pickle.loads(pickle.dumps(S1))
assert hash(S1) == hash(S)
def DONOTtest_array_with_non_container_elements():
More information about the Pypy-commit
mailing list