Author: Amaury Forgeot d'Arc <[email protected]>
Branch: stdlib-2.7.3
Changeset: r57228:9a2c42e707c4
Date: 2012-09-07 19:36 +0200
http://bitbucket.org/pypy/pypy/changeset/9a2c42e707c4/
Log: Skip tests about hash randomization
diff --git a/lib-python/2.7/test/test_cmd_line.py
b/lib-python/2.7/test/test_cmd_line.py
--- a/lib-python/2.7/test/test_cmd_line.py
+++ b/lib-python/2.7/test/test_cmd_line.py
@@ -5,6 +5,7 @@
import test.test_support, unittest
import sys
from test.script_helper import spawn_python, kill_python, python_exit_code
+from test.test_support import check_impl_detail
class CmdLineTest(unittest.TestCase):
@@ -94,7 +95,8 @@
code = 'print(hash("spam"))'
data = self.start_python('-R', '-c', code)
hashes.append(data)
- self.assertNotEqual(hashes[0], hashes[1])
+ if check_impl_detail(pypy=False): # PyPy does not really implement it!
+ self.assertNotEqual(hashes[0], hashes[1])
# Verify that sys.flags contains hash_randomization
code = 'import sys; print sys.flags'
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
@@ -11,6 +11,7 @@
import subprocess
from test import test_support
+from test.test_support import impl_detail
from collections import Hashable
IS_64BIT = (struct.calcsize('l') == 8)
@@ -150,6 +151,7 @@
def get_hash_command(self, repr_):
return 'print(hash(%s))' % repr_
+ @impl_detail("PyPy does not support hash randomization", pypy=False)
def get_hash(self, repr_, seed=None):
env = os.environ.copy()
if seed is not None:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit