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

Method test_parametrize_indirect

testing/python/metafunc.py:639–652  ·  view source on GitHub ↗

#714

(self)

Source from the content-addressed store, hash-verified

637 assert result == ["a0", "a1", "b0", "c", "b1"]
638
639 def test_parametrize_indirect(self) -> None:
640 """#714"""
641
642 def func(x, y):
643 pass
644
645 metafunc = self.Metafunc(func)
646 metafunc.parametrize("x", [1], indirect=True)
647 metafunc.parametrize("y", [2, 3], indirect=True)
648 assert len(metafunc._calls) == 2
649 assert metafunc._calls[0].funcargs == {}
650 assert metafunc._calls[1].funcargs == {}
651 assert metafunc._calls[0].params == dict(x=1, y=2)
652 assert metafunc._calls[1].params == dict(x=1, y=3)
653
654 def test_parametrize_indirect_list(self) -> None:
655 """#714"""

Callers

nothing calls this directly

Calls 2

MetafuncMethod · 0.95
parametrizeMethod · 0.95

Tested by

no test coverage detected