[pypy-commit] pypy py3k: don't import unicode_literals from __future__, and adapt unicode-->str and str-->bytes

antocuni noreply at buildbot.pypy.org
Fri Jan 27 20:29:17 CET 2012


Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r51873:58915e03655e
Date: 2012-01-27 11:56 +0100
http://bitbucket.org/pypy/pypy/changeset/58915e03655e/

Log:	don't import unicode_literals from __future__, and adapt
	unicode-->str and str-->bytes

diff --git a/pypy/interpreter/test/test_syntax.py b/pypy/interpreter/test/test_syntax.py
--- a/pypy/interpreter/test/test_syntax.py
+++ b/pypy/interpreter/test/test_syntax.py
@@ -260,19 +260,17 @@
 class AppTestUnicodeLiterals:
 
     def test_simple(self):
-        s = """from __future__ import unicode_literals
+        s = """
 x = 'u'
 y = r'u'
-z = u'u'
 b = b'u'
 c = br'u'"""
         ns = {}
         exec(s, ns)
-        assert isinstance(ns["x"], unicode)
-        assert isinstance(ns["y"], unicode)
-        assert isinstance(ns["z"], unicode)
-        assert isinstance(ns["b"], str)
-        assert isinstance(ns["c"], str)
+        assert isinstance(ns["x"], str)
+        assert isinstance(ns["y"], str)
+        assert isinstance(ns["b"], bytes)
+        assert isinstance(ns["c"], bytes)
 
 
 class AppTestComprehensions:


More information about the pypy-commit mailing list