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

Method test_parametrize_indirect

testing/python/metafunc.py:785–796  ·  view source on GitHub ↗

#714

(self)

Source from the content-addressed store, hash-verified

783 assert result == ["a0", "a1", "b0", "c", "b1"]
784
785 def test_parametrize_indirect(self) -> None:
786 """#714"""
787
788 def func(x, y):
789 pass
790
791 metafunc = self.Metafunc(func)
792 metafunc.parametrize("x", [1], indirect=True)
793 metafunc.parametrize("y", [2, 3], indirect=True)
794 assert len(metafunc._calls) == 2
795 assert metafunc._calls[0].params == dict(x=1, y=2)
796 assert metafunc._calls[1].params == dict(x=1, y=3)
797
798 def test_parametrize_indirect_list(self) -> None:
799 """#714"""

Callers

nothing calls this directly

Calls 2

MetafuncMethod · 0.95
parametrizeMethod · 0.95

Tested by

no test coverage detected