Skip to content

Commit f484ce1

Browse files
committed
Remove dict-unpacking-at-home
1 parent 4f034c9 commit f484ce1

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

Lib/test/test_source_encoding.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -540,9 +540,14 @@ def check_script_error(self, src, expected, lineno=...):
540540
self.assertIn(line.encode(), err)
541541

542542
def test_coding_spec_unknown_encoding(self):
543-
src = (b'# coding: dict-unpacking-at-home\n'
544-
b'{foo} = {"foo": "bar"}\n')
545-
self.check_script_error(src, br"unknown encoding: dict-unpacking-at-home")
543+
src = (b'# coding: c1252\n'
544+
b'print("Hi!")\n')
545+
self.check_script_error(src, br"unknown encoding: c1252")
546+
547+
def test_coding_spec_decode_error(self):
548+
src = (b'# coding: shift-jis\n'
549+
b'print("\xc4\x85")\n')
550+
self.check_script_error(src, br"'shift_jis' codec can't decode byte")
546551

547552
def test_coding_spec_decode_error(self):
548553
src = (b'# coding: shift-jis\n'

0 commit comments

Comments
 (0)