[pypy-commit] pypy py3k: Fix test after merge

amauryfa noreply at buildbot.pypy.org
Sun Feb 5 23:32:27 CET 2012


Author: Amaury Forgeot d'Arc <amauryfa at gmail.com>
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


More information about the pypy-commit mailing list