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

Method test_parametrize_empty_list

testing/python/metafunc.py:247–266  ·  view source on GitHub ↗

#510

(self)

Source from the content-addressed store, hash-verified

245 assert ids == ["4-6", "4-7", "5-6", "5-7"]
246
247 def test_parametrize_empty_list(self) -> None:
248 """#510"""
249
250 def func(y):
251 pass
252
253 class MockConfig:
254 def getini(self, name):
255 return ""
256
257 @property
258 def hook(self):
259 return self
260
261 def pytest_make_parametrize_id(self, **kw):
262 pass
263
264 metafunc = self.Metafunc(func, MockConfig())
265 metafunc.parametrize("y", [])
266 assert "skip" == metafunc._calls[0].marks[0].name
267
268 def test_parametrize_with_userobjects(self) -> None:
269 def func(x, y):

Callers

nothing calls this directly

Calls 3

MetafuncMethod · 0.95
parametrizeMethod · 0.95
MockConfigClass · 0.85

Tested by

no test coverage detected