Skip to content

Commit 9c44367

Browse files
stanislavlevingsnedders
authored andcommitted
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 986560a commit 9c44367

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

html5lib/tests/test_stream.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,11 @@ 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"))])
314316
def test_invalid_codepoints_surrogates(inp, num):
315317
inp = eval(inp) # pylint:disable=eval-used
316318
fp = StringIO(inp)

0 commit comments

Comments
 (0)