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

Function test_keyword_option_custom

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

Source from the content-addressed store, hash-verified

275 ],
276)
277def test_keyword_option_custom(
278 expr: str, expected_passed: List[str], pytester: Pytester
279) -> None:
280 pytester.makepyfile(
281 """
282 def test_interface():
283 pass
284 def test_nointer():
285 pass
286 def test_pass():
287 pass
288 def test_1():
289 pass
290 def test_2():
291 pass
292 """
293 )
294 rec = pytester.inline_run("-k", expr)
295 passed, skipped, fail = rec.listoutcomes()
296 passed_str = [x.nodeid.split("::")[-1] for x in passed]
297 assert passed_str == expected_passed
298
299
300def test_keyword_option_considers_mark(pytester: Pytester) -> None:

Callers

nothing calls this directly

Calls 3

listoutcomesMethod · 0.80
makepyfileMethod · 0.45
inline_runMethod · 0.45

Tested by

no test coverage detected