Home - Summaries: (main) : (py3.11) : Everything - Nightly builds - Benchmarks - RPython - Builders - About

pypy/module/_codecs/test/test_locale.py::TestLocaleCodec::()::test_decode_locale_latin1[locale_decoder1]

self = <pypy.module._codecs.test.test_locale.TestLocaleCodec object at 0x00007fca3402f440>
locale_decoder = <function str_decode_locale_strict at 0x00007fca32f9d178>

    @pytest.mark.parametrize('locale_decoder',
                 (str_decode_locale_surrogateescape, str_decode_locale_strict))
    def test_decode_locale_latin1(self, locale_decoder):
        self.setlocale("fr_FR")
        uni = u"août"
        string = uni.encode('latin1')
>       assert locale_decoder(string) == (uni.encode('utf8'), len(uni))

module/_codecs/test/test_locale.py:77: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
module/_codecs/locale.py:118: in str_decode_locale_strict
    errorhandler('strict', 'filesystemencoding', errmsg, s, 0, 1)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

errors = 'strict', encoding = 'filesystemencoding'
msg = 'pypy_char2wchar_strict failed', s = 'ao\xfbt', startingpos = 0
endingpos = 1

    def default_unicode_error_decode(errors, encoding, msg, s,
                                     startingpos, endingpos):
        assert endingpos >= 0
        if errors == 'replace':
            return u'\ufffd', endingpos
        if errors == 'ignore':
            return u'', endingpos
>       raise UnicodeDecodeError(encoding, s, startingpos, endingpos, msg)
E       UnicodeDecodeError: 'filesystemencoding' codec can't decode byte 0x61 in position 0: pypy_char2wchar_strict failed

../rpython/rlib/runicode.py:104: UnicodeDecodeError
builder: own-macos-x86-64 build #1203
test: pypy/module/_codecs/test/test_locale/py/TestLocaleCodec/()/test_decode_locale_latin1[locale_decoder1]