File tree 1 file changed +0
-22
lines changed 1 file changed +0
-22
lines changed Original file line number Diff line number Diff line change @@ -26,28 +26,6 @@ def test_codec_name_d(self):
26
26
self .assertEqual (inputstream .codecName ("ISO_8859--1" ), "windows-1252" )
27
27
28
28
29
- def test_unicode_input_encoding ():
30
- p = HTMLParser ()
31
- assert p .documentEncoding is None
32
- p .parse (b'<meta charset=latin2>' , useChardet = False )
33
- assert p .documentEncoding == 'iso8859-2'
34
-
35
- p = HTMLParser ()
36
- assert p .documentEncoding is None
37
- p .parse ('<meta charset=latin2>' )
38
- assert p .documentEncoding is None
39
-
40
- p = HTMLParser ()
41
- assert p .documentEncoding is None
42
- try :
43
- p .parse ('<meta charset=latin2>' , encoding = 'latin3' )
44
- except TypeError as e :
45
- assert 'Cannot explicitly set an encoding with a unicode string' in str (e )
46
- else :
47
- assert 0 , 'Expected TypeError'
48
- assert p .documentEncoding is None
49
-
50
-
51
29
def runParserEncodingTest (data , encoding ):
52
30
p = HTMLParser ()
53
31
assert p .documentEncoding is None
You can’t perform that action at this time.
0 commit comments