Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95623:27b376c2d467
Date: 2019-01-12 19:53 +0200
http://bitbucket.org/pypy/pypy/changeset/27b376c2d467/

Log:    os.fsencode('\x80') fails on python3 windows

diff --git a/pypy/interpreter/test/test_gateway.py 
b/pypy/interpreter/test/test_gateway.py
--- a/pypy/interpreter/test/test_gateway.py
+++ b/pypy/interpreter/test/test_gateway.py
@@ -502,15 +502,20 @@
                        space.mul(space.wrap(sys.maxint), space.wrap(-7)))
 
     def test_interp2app_unwrap_spec_fsencode(self):
+        import sys
         space = self.space
         w = space.wrap
         def f(filename):
             return space.newbytes(filename)
         app_f = gateway.interp2app_temp(f, unwrap_spec=['fsencode'])
         w_app_f = space.wrap(app_f)
-        assert space.eq_w(
-            space.call_function(w_app_f, w(u'\udc80')),
-            space.newbytes('\x80'))
+        if sys.platform == 'win32':
+            raises(gateway.OperationError, space.call_function, 
+                   w_app_f, w(u'\udc80'))
+        else:
+            assert space.eq_w(
+                space.call_function(w_app_f, w(u'\udc80')),
+                space.newbytes('\x80'))
 
     def test_interp2app_unwrap_spec_typechecks(self):
         from rpython.rlib.rarithmetic import r_longlong
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to