bpo-40593: Improve syntax errors for invalid characters in source code. (GH-20033)

This commit is contained in:
Serhiy Storchaka 2020-05-12 12:42:04 +03:00 committed by GitHub
parent f3a5b7ada0
commit 74ea6b5a75
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 92 additions and 45 deletions

View file

@ -583,7 +583,7 @@ non-important content
])
# Different error message is raised for other whitespace characters.
self.assertAllRaise(SyntaxError, 'invalid character in identifier',
self.assertAllRaise(SyntaxError, r"invalid non-printable character U\+00A0",
["f'''{\xa0}'''",
"\xa0",
])