[pypy-commit] pypy default: we cannot call self.rand() when using -A
antocuni
noreply at buildbot.pypy.org
Fri Mar 23 20:33:19 CET 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch:
Changeset: r53958:ea2751a04d47
Date: 2012-03-23 20:32 +0100
http://bitbucket.org/pypy/pypy/changeset/ea2751a04d47/
Log: we cannot call self.rand() when using -A
diff --git a/pypy/objspace/std/test/test_userobject.py b/pypy/objspace/std/test/test_userobject.py
--- a/pypy/objspace/std/test/test_userobject.py
+++ b/pypy/objspace/std/test/test_userobject.py
@@ -244,8 +244,12 @@
skip("disabled")
if self.runappdirect:
total = 500000
+ def rand():
+ import random
+ return random.randrange(0, 5)
else:
total = 50
+ rand = self.rand
#
class A(object):
hash = None
@@ -256,7 +260,7 @@
a = A()
a.next = tail.next
tail.next = a
- for j in range(self.rand()):
+ for j in range(rand()):
any = any.next
if any.hash is None:
any.hash = hash(any)
More information about the pypy-commit
mailing list