Commits

Amaury Forgeot d'Arc  committed 5c2de72

Fix many -A tests in module/gc

  • Participants
  • Parent commits aa318e7
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/gc/test/test_referents.py

         cls._backup = [rgc.get_rpy_roots]
         w = cls.space.wrap
         space = cls.space
-        class RandomRPythonObject(object):
-            pass
+        if option.runappdirect:
+            ro = None
+        else:
+            class RandomRPythonObject(object):
+                pass
+            ro = RandomRPythonObject()
         l4 = space.newlist([w(4)])
         l2 = space.newlist([w(2)])
         l7 = space.newlist([w(7)])
-        cls.ALL_ROOTS = [l4, space.newlist([l2, l7]), RandomRPythonObject(),
+        cls.ALL_ROOTS = [l4, space.newlist([l2, l7]), ro,
                          space.newtuple([l7])]
         cls.w_ALL_ROOTS = cls.space.newlist(cls.ALL_ROOTS)
         rgc.get_rpy_roots = lambda: (