Author: Antonio Cuni <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to