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

Function test_skip_using_reason_works_ok

testing/test_skipping.py:1447–1458  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

1445
1446
1447def test_skip_using_reason_works_ok(pytester: Pytester) -> None:
1448 p = pytester.makepyfile(
1449 """
1450 import pytest
1451
1452 def test_skipping_reason():
1453 pytest.skip(reason="skippedreason")
1454 """
1455 )
1456 result = pytester.runpytest(p)
1457 result.stdout.no_fnmatch_line("*PytestDeprecationWarning*")
1458 result.assert_outcomes(skipped=1)
1459
1460
1461def test_fail_using_reason_works_ok(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 4

no_fnmatch_lineMethod · 0.80
assert_outcomesMethod · 0.80
makepyfileMethod · 0.45
runpytestMethod · 0.45

Tested by

no test coverage detected