Verify that using pytest.skip() with unknown parameter raises an error.
(pytester: Pytester)
| 1359 | |
| 1360 | |
| 1361 | def 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 | |
| 1376 | def test_mark_xfail_item(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected