Skip to content

Commit 1a66508

Browse files
Fix Pytest4.x compatibility error
According to pytest docs: ``` marks in pytest.mark.parametrize Removed in version 4.0. Applying marks to values of a pytest.mark.parametrize call is now deprecated. ... This was considered hard to read and understand, and also its implementation presented problems to the code preventing further internal improvements in the marks architecture. To update the code, use pytest.param ``` Signed-off-by: Stanislav Levin <[email protected]>
1 parent 4b22754 commit 1a66508

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

html5lib/tests/test_stream.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,12 @@ def test_invalid_codepoints(inp, num):
308308
("'\\uD800\\uD800\\uD800'", 3),
309309
("'a\\uD800a\\uD800a\\uD800a'", 3),
310310
("'\\uDFFF\\uDBFF'", 2),
311-
pytest.mark.skipif(sys.maxunicode == 0xFFFF,
312-
("'\\uDBFF\\uDFFF'", 2),
313-
reason="narrow Python")])
311+
pytest.param(
312+
"'\\uDBFF\\uDFFF'", 2,
313+
marks=pytest.mark.skipif(
314+
sys.maxunicode == 0xFFFF,
315+
reason="narrow Python")),
316+
])
314317
def test_invalid_codepoints_surrogates(inp, num):
315318
inp = eval(inp) # pylint:disable=eval-used
316319
fp = StringIO(inp)

0 commit comments

Comments
 (0)