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

Method test_marked_one_arg

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

evaluate_skip_marksFunction · 0.90
getitemMethod · 0.45

Tested by

no test coverage detected