diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2020-05-12 09:42:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-12 09:42:04 (GMT) |
commit | 74ea6b5a7501fb393cd567fb21998d0bfeeb267c (patch) | |
tree | 6f82cb1ae91f9cc21e0181f7284039b7d58d0309 /Lib/test/test_source_encoding.py | |
parent | f3a5b7ada0c951f317dbd307de4b410e58d3e1b3 (diff) | |
download | cpython-74ea6b5a7501fb393cd567fb21998d0bfeeb267c.zip cpython-74ea6b5a7501fb393cd567fb21998d0bfeeb267c.tar.gz cpython-74ea6b5a7501fb393cd567fb21998d0bfeeb267c.tar.bz2 |
bpo-40593: Improve syntax errors for invalid characters in source code. (GH-20033)
Diffstat (limited to 'Lib/test/test_source_encoding.py')
-rw-r--r-- | Lib/test/test_source_encoding.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_source_encoding.py b/Lib/test/test_source_encoding.py index a0bd741..5ca4346 100644 --- a/Lib/test/test_source_encoding.py +++ b/Lib/test/test_source_encoding.py @@ -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') |