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

Function test_mark_option

testing/test_mark.py:215–232  ·  view source on GitHub ↗
(
    expr: str, expected_passed: List[Optional[str]], pytester: Pytester
)

Source from the content-addressed store, hash-verified

213 ],
214)
215def test_mark_option(
216 expr: str, expected_passed: List[Optional[str]], pytester: Pytester
217) -> None:
218 pytester.makepyfile(
219 """
220 import pytest
221 @pytest.mark.xyz
222 def test_one():
223 pass
224 @pytest.mark.xyz2
225 def test_two():
226 pass
227 """
228 )
229 rec = pytester.inline_run("-m", expr)
230 passed, skipped, fail = rec.listoutcomes()
231 passed_str = [x.nodeid.split("::")[-1] for x in passed]
232 assert passed_str == expected_passed
233
234
235@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

listoutcomesMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected