Miro Hrončok
|
d0f5779852
|
Fix FTBFS with Pytest 4, deselect test_encoding
________________________________ test_encoding _________________________________
def test_encoding():
for filename in get_data_files("encoding"):
tests = _TestData(filename, b"data", encoding=None)
for test in tests:
> runParserEncodingTest(test[b'data'], test[b'encoding'])
html5lib/tests/test_encoding.py:102:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
data = b'<!DOCTYPE HTML>\n<script>document.write(\'<meta charset="ISO-8859-\' + \'2">\')</script>'
encoding = 'iso-8859-2'
def runParserEncodingTest(data, encoding):
p = HTMLParser()
assert p.documentEncoding is None
p.parse(data, useChardet=False)
encoding = encoding.lower().decode("ascii")
> assert encoding == p.documentEncoding, errorMessage(data, encoding, p.documentEncoding)
E AssertionError: Input:
E b'<!DOCTYPE HTML>\n<script>document.write(\'<meta charset="ISO-8859-\' + \'2">\')</script>'
E Expected:
E 'iso-8859-2'
E Recieved
E 'windows-1252'
E
E assert 'iso-8859-2' == 'windows-1252'
E - iso-8859-2
E + windows-1252
html5lib/tests/test_encoding.py:84: AssertionError
|
2019-07-30 01:26:45 +02:00 |
|