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

Function test_parametrize_with_module

testing/test_mark.py:332–344  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

330
331
332def test_parametrize_with_module(pytester: Pytester) -> None:
333 pytester.makepyfile(
334 """
335 import pytest
336 @pytest.mark.parametrize("arg", [pytest,])
337 def test_func(arg):
338 pass
339 """
340 )
341 rec = pytester.inline_run()
342 passed, skipped, fail = rec.listoutcomes()
343 expected_id = "test_func[" + pytest.__name__ + "]"
344 assert passed[0].nodeid.split("::")[-1] == expected_id
345
346
347@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