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

Method test_multiple_parametrize

testing/python/collect.py:559–573  ·  view source on GitHub ↗
(self, pytester: Pytester)

Source from the content-addressed store, hash-verified

557 config.hook.pytest_pyfunc_call(pyfuncitem=item)
558
559 def test_multiple_parametrize(self, pytester: Pytester) -> None:
560 modcol = pytester.getmodulecol(
561 """
562 import pytest
563 @pytest.mark.parametrize('x', [0, 1])
564 @pytest.mark.parametrize('y', [2, 3])
565 def test1(x, y):
566 pass
567 """
568 )
569 colitems = modcol.collect()
570 assert colitems[0].name == "test1[2-0]"
571 assert colitems[1].name == "test1[2-1]"
572 assert colitems[2].name == "test1[3-0]"
573 assert colitems[3].name == "test1[3-1]"
574
575 def test_issue751_multiple_parametrize_with_ids(self, pytester: Pytester) -> None:
576 modcol = pytester.getmodulecol(

Callers

nothing calls this directly

Calls 2

getmodulecolMethod · 0.45
collectMethod · 0.45

Tested by

no test coverage detected