Author: Philip Jenvey <[email protected]>
Branch: py3k
Changeset: r84653:58ec8080e84c
Date: 2016-05-23 21:27 -0700
http://bitbucket.org/pypy/pypy/changeset/58ec8080e84c/

Log:    fix on python3 -A

diff --git a/pypy/module/imp/test/support.py b/pypy/module/imp/test/support.py
--- a/pypy/module/imp/test/support.py
+++ b/pypy/module/imp/test/support.py
@@ -4,8 +4,10 @@
 
     def setup_class(cls):
         space = cls.space
-        cls.w_testfn_unencodable = space.wrap(get_unencodable())
-        cls.w_special_char = space.wrap(get_special_char())
+        cls.testfn_unencodable = get_unencodable()
+        cls.w_testfn_unencodable = space.wrap(cls.testfn_unencodable)
+        cls.special_char = get_special_char()
+        cls.w_special_char = space.wrap(cls.special_char)
 
 def get_unencodable():
     """Copy of the stdlib's support.TESTFN_UNENCODABLE:
diff --git a/pypy/module/imp/test/test_import.py 
b/pypy/module/imp/test/test_import.py
--- a/pypy/module/imp/test/test_import.py
+++ b/pypy/module/imp/test/test_import.py
@@ -133,10 +133,9 @@
              line2 = "# encoding: iso-8859-1\n",
              bad = "# encoding: uft-8\n")
 
-    w_special_char = getattr(cls, 'w_special_char', None)
-    if not space.is_none(w_special_char):
-        special_char = space.unicode_w(w_special_char).encode(
-            sys.getfilesystemencoding())
+    special_char = cls.special_char
+    if special_char is not None:
+        special_char = special_char.encode(sys.getfilesystemencoding())
         p.join(special_char + '.py').write('pass')
 
     # create a .pyw file
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to