Commits

Gregor Wegberg  committed 54527e0

consistency: use check() instead of assert

  • Participants
  • Parent commits a2d0b17
  • Branches gc-incminimark-pinning

Comments (0)

Files changed (1)

File rpython/jit/backend/llsupport/test/zrpy_gc_test.py

             if not helper.inst:
                 helper.inst = X()
                 helper.inst.x = 101
-                assert rgc.pin(helper.inst)
+                check(rgc.pin(helper.inst))
             else:
-                assert rgc._is_pinned(helper.inst)
+                check(rgc._is_pinned(helper.inst))
             return helper.inst
 
         def fn(n, x, *args):
                 helper.inst = X()
                 helper.inst.x = 101
                 helper.pinned = True
-                assert rgc.pin(helper.inst)
+                check(rgc.pin(helper.inst))
             elif n < 100 and helper.pinned:
                 rgc.unpin(helper.inst)
                 helper.pinned = False
             #
             if helper.pinned:
-                assert rgc._is_pinned(helper.inst)
+                check(rgc._is_pinned(helper.inst))
                 helper.count_pinned += 1
             else:
-                assert not rgc._is_pinned(helper.inst)
+                check(not rgc._is_pinned(helper.inst))
                 helper.count_unpinned += 1
             return helper.inst
 
         def fn(n, x, *args):
             t = get_y(n)
             promote(t)
-            assert t.x == 101
+            check(t.x == 101)
             n -= 1
             return (n, x) + args
 
         def after(n, x, *args):
-            assert helper.count_pinned > 0
-            assert helper.count_unpinned > 0
-            assert not helper.pinned
+            check(helper.count_pinned > 0)
+            check(helper.count_unpinned > 0)
+            check(not helper.pinned)
 
         return None, fn, after