We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f484ce1 commit 7d0ea60Copy full SHA for 7d0ea60
1 file changed
Lib/test/test_source_encoding.py
@@ -554,6 +554,11 @@ def test_coding_spec_decode_error(self):
554
b'print("\xc4\x85")\n')
555
self.check_script_error(src, br"'shift_jis' codec can't decode byte")
556
557
+ def test_coding_spec_non_text_encoding(self):
558
+ src = (b'# coding: hex_codec\n'
559
+ b'print("Test")\n')
560
+ self.check_script_error(src, br"'hex_codec' is not a text encoding")
561
+
562
563
if __name__ == "__main__":
564
unittest.main()
0 commit comments