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

Method test_parametrize_twoargs

testing/python/metafunc.py:892–899  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

890 assert metafunc._calls[1].id == "2"
891
892 def test_parametrize_twoargs(self) -> None:
893 metafunc = self.Metafunc(lambda x, y: None)
894 metafunc.parametrize(("x", "y"), [(1, 2), (3, 4)])
895 assert len(metafunc._calls) == 2
896 assert metafunc._calls[0].funcargs == dict(x=1, y=2)
897 assert metafunc._calls[0].id == "1-2"
898 assert metafunc._calls[1].funcargs == dict(x=3, y=4)
899 assert metafunc._calls[1].id == "3-4"
900
901 def test_parametrize_multiple_times(self, pytester: Pytester) -> None:
902 pytester.makepyfile(

Callers

nothing calls this directly

Calls 2

MetafuncMethod · 0.95
parametrizeMethod · 0.95

Tested by

no test coverage detected