[pypy-svn] r78589 - pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test
cfbolz at codespeak.net
cfbolz at codespeak.net
Sun Oct 31 12:09:29 CET 2010
Author: cfbolz
Date: Sun Oct 31 12:09:26 2010
New Revision: 78589
Modified:
pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
Log:
this is needed for the tests to make sense
Modified: pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py
==============================================================================
--- pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py (original)
+++ pypy/branch/jit-unroll-loops/pypy/jit/metainterp/test/test_optimizeopt.py Sun Oct 31 12:09:26 2010
@@ -3946,12 +3946,13 @@
self.optimize_loop(ops, expected, preamble)
# ----------
- def optimize_strunicode_loop(self, ops, optops):
+ def optimize_strunicode_loop(self, ops, optops, preamble):
# check with the arguments passed in
- self.optimize_loop(ops, optops)
+ self.optimize_loop(ops, optops, preamble)
# check with replacing 'str' with 'unicode' everywhere
- self.optimize_loop(ops.replace('str','unicode').replace('s"', 'u"'),
- optops.replace('str','unicode').replace('s"', 'u"'))
+ def r(s):
+ return r.replace('str','unicode').replace('s"', 'u"')
+ self.optimize_loop(r(ops), r(optops), r(preamble))
def test_newstr_1(self):
ops = """
More information about the Pypy-commit
mailing list