Author: Matti Picus <matti.pi...@gmail.com>
Branch: unicode-utf8-py3
Changeset: r95305:debe241b1b92
Date: 2018-11-12 19:20 -0800
http://bitbucket.org/pypy/pypy/changeset/debe241b1b92/

Log:    fix to skip test

diff --git a/pypy/module/cpyext/test/test_unicodeobject.py 
b/pypy/module/cpyext/test/test_unicodeobject.py
--- a/pypy/module/cpyext/test/test_unicodeobject.py
+++ b/pypy/module/cpyext/test/test_unicodeobject.py
@@ -532,9 +532,9 @@
         w_u = space.wrap(u'sp&#228;m')
         try:
             w_s = PyUnicode_EncodeFSDefault(space, w_u)
-        except OperationError:
+        except (OperationError, UnicodeEncodeError):
             py.test.skip("Requires a unicode-aware fsencoding")
-        with rffi.scoped_str2charp(space.text_w(w_s)) as encoded:
+        with rffi.scoped_str2charp(space.bytes_w(w_s)) as encoded:
             w_decoded = PyUnicode_DecodeFSDefaultAndSize(space, encoded, 
space.len_w(w_s))
             assert space.eq_w(w_decoded, w_u)
             w_decoded = PyUnicode_DecodeFSDefault(space, encoded)
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to