Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 381fd0c

Browse files
committed
Clarify the expected TypeError test.
1 parent 722bfd3 commit 381fd0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

html5lib/tests/test_encoding.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def test_unicode_input_encoding():
4141
assert p.documentEncoding is None
4242
try:
4343
p.parse('<meta charset=latin2>', encoding='latin3')
44-
except TypeError:
45-
pass
44+
except TypeError as e:
45+
assert 'Cannot explicitly set an encoding with a unicode string' in str(e)
4646
else:
4747
assert 0, 'Expected TypeError'
4848
assert p.documentEncoding is None

0 commit comments

Comments
 (0)