Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r52115:30d9837842b5
Date: 2012-02-03 19:59 +0100
http://bitbucket.org/pypy/pypy/changeset/30d9837842b5/
Log: Fix test after merge
diff --git a/pypy/interpreter/astcompiler/test/test_compiler.py
b/pypy/interpreter/astcompiler/test/test_compiler.py
--- a/pypy/interpreter/astcompiler/test/test_compiler.py
+++ b/pypy/interpreter/astcompiler/test/test_compiler.py
@@ -876,28 +876,19 @@
def test_const_fold_unicode_subscr(self):
source = """def f():
- return u"abc"[0]
+ return "abc"[0]
"""
counts = self.count_instructions(source)
assert counts == {ops.LOAD_CONST: 1, ops.RETURN_VALUE: 1}
# getitem outside of the BMP should not be optimized
source = """def f():
- return u"\U00012345"[0]
+ return "\U00012345"[0]
"""
counts = self.count_instructions(source)
assert counts == {ops.LOAD_CONST: 2, ops.BINARY_SUBSCR: 1,
ops.RETURN_VALUE: 1}
- # getslice is not yet optimized.
- # Still, check a case which yields the empty string.
- source = """def f():
- return u"abc"[:0]
- """
- counts = self.count_instructions(source)
- assert counts == {ops.LOAD_CONST: 2, ops.SLICE+2: 1,
- ops.RETURN_VALUE: 1}
-
def test_remove_dead_code(self):
source = """def f(x):
return 5
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit