[pypy-commit] pypy default: make tests slightly happier and fix oparser

fijal noreply at buildbot.pypy.org
Thu Jun 9 11:04:01 CEST 2011


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r44850:6f73b19ebba9
Date: 2011-06-09 10:50 +0200
http://bitbucket.org/pypy/pypy/changeset/6f73b19ebba9/

Log:	make tests slightly happier and fix oparser

diff --git a/pypy/jit/metainterp/test/test_logger.py b/pypy/jit/metainterp/test/test_logger.py
--- a/pypy/jit/metainterp/test/test_logger.py
+++ b/pypy/jit/metainterp/test/test_logger.py
@@ -53,7 +53,7 @@
     def make_metainterp_sd(self):
         class FakeJitDriver(object):
             class warmstate(object):
-                get_location_str = staticmethod(lambda args: args[0]._get_str())
+                get_location_str = staticmethod(lambda args: "dupa")
         
         class FakeMetaInterpSd:
             cpu = AbstractCPU()
@@ -116,10 +116,10 @@
     def test_debug_merge_point(self):
         inp = '''
         []
-        debug_merge_point(0, 0, "dupa")
+        debug_merge_point(0, 0)
         '''
         _, loop, oloop = self.reparse(inp, check_equal=False)
-        assert loop.operations[0].getarg(2)._get_str() == "dupa"
+        assert loop.operations[0].getarg(1).getint() == 0
         assert oloop.operations[0].getarg(1)._get_str() == "dupa"
         
     def test_floats(self):
diff --git a/pypy/jit/tool/oparser.py b/pypy/jit/tool/oparser.py
--- a/pypy/jit/tool/oparser.py
+++ b/pypy/jit/tool/oparser.py
@@ -212,7 +212,7 @@
         descr = None
         if argspec.strip():
             if opname == 'debug_merge_point':
-                allargs = argspec.split(',', 2)
+                allargs = argspec.split(',', 1)
             else:
                 allargs = [arg for arg in argspec.split(",")
                            if arg != '']


More information about the pypy-commit mailing list