Author: Ronan Lamy <[email protected]>
Branch: py3.6
Changeset: r97592:c5ca148709ff
Date: 2019-09-23 13:11 +0100
http://bitbucket.org/pypy/pypy/changeset/c5ca148709ff/

Log:    add locale test

diff --git a/pypy/module/_codecs/test/test_locale.py 
b/pypy/module/_codecs/test/test_locale.py
--- a/pypy/module/_codecs/test/test_locale.py
+++ b/pypy/module/_codecs/test/test_locale.py
@@ -60,6 +60,12 @@
             assert (locale_decoder(val) ==
                     utf8_decoder(val, 'strict', True, None)[:2])
 
+    def test_decode_locale_latin1(self):
+        self.setlocale("fr_FR")
+        uni = u"ao&#251;t"
+        string = uni.encode('latin1')
+        assert str_decode_locale_surrogateescape(string) == 
(uni.encode('utf8'), len(uni))
+
     def test_decode_locale_errorhandler(self):
         self.setlocale("en_US.UTF-8")
         locale_decoder = str_decode_locale_surrogateescape
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to