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

Method test_parametrize_onearg

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

Source from the content-addressed store, hash-verified

873 )
874
875 def test_parametrize_onearg(self) -> None:
876 metafunc = self.Metafunc(lambda x: None)
877 metafunc.parametrize("x", [1, 2])
878 assert len(metafunc._calls) == 2
879 assert metafunc._calls[0].funcargs == dict(x=1)
880 assert metafunc._calls[0].id == "1"
881 assert metafunc._calls[1].funcargs == dict(x=2)
882 assert metafunc._calls[1].id == "2"
883
884 def test_parametrize_onearg_indirect(self) -> None:
885 metafunc = self.Metafunc(lambda x: None)

Callers

nothing calls this directly

Calls 2

MetafuncMethod · 0.95
parametrizeMethod · 0.95

Tested by

no test coverage detected