Commits

Philip Jenvey  committed e569a7d

simplify

  • Participants
  • Parent commits 8b8e895
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/module/imp/test/support.py

         if sys.platform == 'nt':
             testfn_unencodable = testfn + u"-\u5171\u0141\u2661\u0363\uDC80"
         elif sys.platform != 'darwin':
-            fsenc = sys.getfilesystemencoding()
             try:
-                '\xff'.decode(fsenc)
+                '\xff'.decode(sys.getfilesystemencoding())
             except UnicodeDecodeError:
-                w_unenc = space.call_method(space.wrapbytes('-\xff'), 'decode',
-                                            space.wrap(fsenc),
-                                            space.wrap('surrogateescape'))
-                testfn_unencodable = testfn + space.unicode_w(w_unenc)
+                testfn_unencodable = testfn + u'-\udcff'
         cls.w_testfn_unencodable = space.wrap(testfn_unencodable)