We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent da8f94e commit 29e2472Copy full SHA for 29e2472
html5lib/tests/test_stream.py
@@ -313,7 +313,11 @@ def test_invalid_codepoints(inp, num):
313
reason="narrow Python")])
314
def test_invalid_codepoints_surrogates(inp, num):
315
inp = eval(inp) # pylint:disable=eval-used
316
- stream = HTMLUnicodeInputStream(StringIO(inp))
+ fp = StringIO(inp)
317
+ if ord(max(fp.read())) > 0xFFFF:
318
+ pytest.skip("StringIO altered string")
319
+ fp.seek(0)
320
+ stream = HTMLUnicodeInputStream(fp)
321
for _i in range(len(inp)):
322
stream.char()
323
assert len(stream.errors) == num
0 commit comments