[pypy-commit] pypy unicode-utf8: (mattip, arigo)

arigo pypy.commits at gmail.com
Sat Mar 17 12:13:43 EDT 2018


Author: Armin Rigo <arigo at tunes.org>
Branch: unicode-utf8
Changeset: r93983:eda16cfcfb5e
Date: 2018-03-17 17:13 +0100
http://bitbucket.org/pypy/pypy/changeset/eda16cfcfb5e/

Log:	(mattip, arigo)

	more of the same

diff --git a/pypy/module/cpyext/test/test_codecs.py b/pypy/module/cpyext/test/test_codecs.py
--- a/pypy/module/cpyext/test/test_codecs.py
+++ b/pypy/module/cpyext/test/test_codecs.py
@@ -11,5 +11,5 @@
         w_encoded = space.call_method(w_encoder, 'encode', space.wrap(u'späm'))
         w_decoder = PyCodec_IncrementalDecoder(space, utf8, None)
         w_decoded = space.call_method(w_decoder, 'decode', w_encoded)
-        assert space.unicode_w(w_decoded) == u'späm'
+        assert space.utf8_w(w_decoded) == u'späm'.encode("utf-8")
         rffi.free_charp(utf8)
diff --git a/pypy/module/cpyext/test/test_eval.py b/pypy/module/cpyext/test/test_eval.py
--- a/pypy/module/cpyext/test/test_eval.py
+++ b/pypy/module/cpyext/test/test_eval.py
@@ -131,7 +131,7 @@
         finally:
             rffi.free_charp(buf)
         w_a = space.getitem(w_globals, space.wrap("a"))
-        assert space.unicode_w(w_a) == u'caf\xe9'
+        assert space.utf8_w(w_a) == u'caf\xe9'.encode("utf-8")
         lltype.free(flags, flavor='raw')
 
     def test_run_file(self, space):


More information about the pypy-commit mailing list