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

Function test_keyword_option_parametrize

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

Source from the content-addressed store, hash-verified

313 ],
314)
315def test_keyword_option_parametrize(
316 expr: str, expected_passed: List[str], pytester: Pytester
317) -> None:
318 pytester.makepyfile(
319 """
320 import pytest
321 @pytest.mark.parametrize("arg", [None, 1.3, "2-3"])
322 def test_func(arg):
323 pass
324 """
325 )
326 rec = pytester.inline_run("-k", expr)
327 passed, skipped, fail = rec.listoutcomes()
328 passed_str = [x.nodeid.split("::")[-1] for x in passed]
329 assert passed_str == expected_passed
330
331
332def test_parametrize_with_module(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