[pypy-commit] pypy unicode-strategies: fix test_stressdict
antocuni
noreply at buildbot.pypy.org
Wed Oct 31 18:06:37 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: unicode-strategies
Changeset: r58651:f48a80508682
Date: 2012-10-31 17:58 +0100
http://bitbucket.org/pypy/pypy/changeset/f48a80508682/
Log: fix test_stressdict
diff --git a/pypy/objspace/std/test/test_dictmultiobject.py b/pypy/objspace/std/test/test_dictmultiobject.py
--- a/pypy/objspace/std/test/test_dictmultiobject.py
+++ b/pypy/objspace/std/test/test_dictmultiobject.py
@@ -859,7 +859,7 @@
raises(RuntimeError, list, it)
-class FakeString(str):
+class FakeWrapper(object):
hash_count = 0
def unwrap(self, space):
self.unwrapped = True
@@ -869,6 +869,12 @@
self.hash_count += 1
return str.__hash__(self)
+class FakeString(FakeWrapper, str):
+ pass
+
+class FakeUnicode(FakeWrapper, unicode):
+ pass
+
# the minimal 'space' needed to use a W_DictMultiObject
class FakeSpace:
hash_count = 0
@@ -941,6 +947,7 @@
w_bool = bool
w_float = float
StringObjectCls = FakeString
+ UnicodeObjectCls = FakeUnicode
w_dict = W_DictMultiObject
iter = iter
fixedview = list
More information about the pypy-commit
mailing list