[pypy-svn] r78908 - pypy/trunk/pypy/jit/metainterp/test

arigo at codespeak.net arigo at codespeak.net
Tue Nov 9 10:20:32 CET 2010


Author: arigo
Date: Tue Nov  9 10:20:30 2010
New Revision: 78908

Modified:
   pypy/trunk/pypy/jit/metainterp/test/test_del.py
Log:
Fix the test.

Modified: pypy/trunk/pypy/jit/metainterp/test/test_del.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/test/test_del.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/test/test_del.py	Tue Nov  9 10:20:30 2010
@@ -85,6 +85,7 @@
     def test_signal_action(self):
         from pypy.module.signal.interp_signal import SignalActionFlag
         action = SignalActionFlag()
+        action.has_bytecode_counter = True
         #
         myjitdriver = JitDriver(greens = [], reds = ['n', 'x'])
         class X:
@@ -92,17 +93,17 @@
         #
         def f(n):
             x = X()
-            while n > 0:
+            action.reset_ticker(n)
+            while True:
                 myjitdriver.can_enter_jit(n=n, x=x)
                 myjitdriver.jit_merge_point(n=n, x=x)
                 x.foo = n
                 n -= 1
-                if action.get() != 0:
+                if action.decrement_ticker(1) < 0:
                     break
-                action.set(0)
             return 42
         self.meta_interp(f, [20])
-        self.check_loops(getfield_raw=1, call=0, call_pure=0)
+        self.check_loops(getfield_raw=1, setfield_raw=1, call=0, call_pure=0)
 
 class TestOOtype(DelTests, OOJitMixin):
     def setup_class(cls):



More information about the Pypy-commit mailing list