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

Function test_mark_option

testing/test_mark.py:232–249  ·  view source on GitHub ↗
(
    expr: str, expected_passed: list[str | None], pytester: Pytester
)

Source from the content-addressed store, hash-verified

230 ],
231)
232def test_mark_option(
233 expr: str, expected_passed: list[str | None], pytester: Pytester
234) -> None:
235 pytester.makepyfile(
236 """
237 import pytest
238 @pytest.mark.xyz
239 def test_one():
240 pass
241 @pytest.mark.xyz2
242 def test_two():
243 pass
244 """
245 )
246 rec = pytester.inline_run("-m", expr)
247 passed, _skipped, _fail = rec.listoutcomes()
248 passed_str = [x.nodeid.split("::")[-1] for x in passed]
249 assert passed_str == expected_passed
250
251
252@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