]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-41112: Fix test_peg_generator on non-UTF-8 locales. (GH-21138)
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 25 Jun 2020 11:31:30 +0000 (14:31 +0300)
committerGitHub <noreply@github.com>
Thu, 25 Jun 2020 11:31:30 +0000 (14:31 +0300)
Lib/test/test_peg_generator/test_c_parser.py

index a5d88501f77ad7c07da0de903ef27575c339ec32..f9935258c861e0dc0c195dd62c3b114b4e03847b 100644 (file)
@@ -365,8 +365,8 @@ class TestCParser(TempdirManager, unittest.TestCase):
         start: expr+ NEWLINE? ENDMARKER
         expr: NAME
         """
-        test_source = """
-        for text in ("a b 42 b a", "名 名 42 名 名"):
+        test_source = r"""
+        for text in ("a b 42 b a", "\u540d \u540d 42 \u540d \u540d"):
             try:
                 parse.parse_string(text, mode=0)
             except SyntaxError as e: