Message340382
> Test that your fix does not break the case of 8-bit non-ascii docstring.
Do you mean double escaping of the backslash as in t\xe4st changed to t\\xe4st due to this PR?
➜ cpython git:(bpo10417) $ cat /tmp/foo.py
# -*- coding: utf-8 -*-
import unittest
class UnicodeTest(unittest.TestCase):
def test_unicode_docstring(self):
u"""docstring with unicode character. t\xe4st"""
self.assertEqual(1+1, 2)
if __name__ == '__main__':
unittest.main()
# ASCII encoding
➜ cpython git:(bpo10417) $ PYTHONIOENCODING=ascii ./python.exe /tmp/foo.py --verbose
test_unicode_docstring (__main__.UnicodeTest)
docstring with unicode character. t\xe4st ... ok
----------------------------------------------------------------------
Ran 1 test in 0.019s
OK
# utf-8 encoding
➜ cpython git:(bpo10417) $ ./python.exe /tmp/foo.py --verbose
test_unicode_docstring (__main__.UnicodeTest)
docstring with unicode character. täst ... ok
----------------------------------------------------------------------
Ran 1 test in 0.004s
OK |
|
Date |
User |
Action |
Args |
2019-04-17 08:26:30 | xtreak | set | recipients:
+ xtreak, ezio.melotti, eric.araujo, r.david.murray, michael.foord, jfinkels, jammon, serhiy.storchaka |
2019-04-17 08:26:30 | xtreak | set | messageid: <1555489590.35.0.644755352234.issue10417@roundup.psfhosted.org> |
2019-04-17 08:26:30 | xtreak | link | issue10417 messages |
2019-04-17 08:26:29 | xtreak | create | |
|