MCPcopy
hub / github.com/pytest-dev/pytest / test_marked_one_arg

Method test_marked_one_arg

testing/test_skipping.py:47–58  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

45 assert skipped.reason == ""
46
47 def test_marked_one_arg(self, pytester: Pytester) -> None:
48 item = pytester.getitem(
49 """
50 import pytest
51 @pytest.mark.skipif("hasattr(os, 'sep')")
52 def test_func():
53 pass
54 """
55 )
56 skipped = evaluate_skip_marks(item)
57 assert skipped
58 assert skipped.reason == "condition: hasattr(os, 'sep')"
59
60 def test_marked_one_arg_with_reason(self, pytester: Pytester) -> None:
61 item = pytester.getitem(

Callers

nothing calls this directly

Calls 2

evaluate_skip_marksFunction · 0.90
getitemMethod · 0.45

Tested by

no test coverage detected