Commits

Antonio Cuni  committed ea2751a

we cannot call self.rand() when using -A

  • Participants
  • Parent commits deac6fc

Comments (0)

Files changed (1)

File pypy/objspace/std/test/test_userobject.py

             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
             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)