mirror of
https://github.com/python/cpython.git
synced 2025-10-12 09:53:19 +00:00
bpo-40593: Improve syntax errors for invalid characters in source code. (GH-20033)
This commit is contained in:
parent
f3a5b7ada0
commit
74ea6b5a75
10 changed files with 92 additions and 45 deletions
|
@ -57,6 +57,9 @@ class MiscSourceEncodingTest(unittest.TestCase):
|
|||
# one byte in common with the UTF-16-LE BOM
|
||||
self.assertRaises(SyntaxError, eval, b'\xff\x20')
|
||||
|
||||
# one byte in common with the UTF-8 BOM
|
||||
self.assertRaises(SyntaxError, eval, b'\xef\x20')
|
||||
|
||||
# two bytes in common with the UTF-8 BOM
|
||||
self.assertRaises(SyntaxError, eval, b'\xef\xbb\x20')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue