MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_invalid_skip_keyword_parameter

Function test_invalid_skip_keyword_parameter

testing/test_skipping.py:1361–1373  ·  view source on GitHub ↗

Verify that using pytest.skip() with unknown parameter raises an error.

(pytester: Pytester)

Source from the content-addressed store, hash-verified

1359
1360
1361def test_invalid_skip_keyword_parameter(pytester: Pytester) -> None:
1362 """Verify that using pytest.skip() with unknown parameter raises an error."""
1363 pytester.makepyfile(
1364 """
1365 import pytest
1366 pytest.skip("skip_module_level", unknown=1)
1367
1368 def test_func():
1369 assert 0
1370 """
1371 )
1372 result = pytester.runpytest()
1373 result.stdout.fnmatch_lines(["*TypeError:*['unknown']*"])
1374
1375
1376def test_mark_xfail_item(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected