Author: fijal Branch: unicode-utf8 Changeset: r93142:fa3bcbe5b09f Date: 2017-11-23 16:17 +0100 http://bitbucket.org/pypy/pypy/changeset/fa3bcbe5b09f/
Log: fix tests on narrow host diff --git a/rpython/rlib/test/test_rutf8.py b/rpython/rlib/test/test_rutf8.py --- a/rpython/rlib/test/test_rutf8.py +++ b/rpython/rlib/test/test_rutf8.py @@ -138,7 +138,7 @@ @given(strategies.lists(strategies.characters())) @example([u'\ud800', u'\udc00']) def test_surrogate_in_utf8(unichars): - uni = u''.join(unichars).encode('utf-8') + uni = ''.join([u.encode('utf8') for u in unichars]) result = rutf8.surrogate_in_utf8(uni) expected = any(uch for uch in unichars if u'\ud800' <= uch <= u'\udfff') assert result == expected @@ -153,6 +153,7 @@ exp_flag = rutf8.FLAG_REGULAR if 0xD800 <= ord(c) <= 0xDFFF: exp_flag = rutf8.FLAG_HAS_SURROGATES + break lgt, flag = rutf8.get_utf8_length_flag(u.encode('utf8')) assert lgt == exp_lgt assert flag == exp_flag _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit