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

Method test_parametrize_empty_list

testing/python/metafunc.py:304–323  ·  view source on GitHub ↗

#510

(self)

Source from the content-addressed store, hash-verified

302 assert ids == ["4-6", "4-7", "5-6", "5-7"]
303
304 def test_parametrize_empty_list(self) -> None:
305 """#510"""
306
307 def func(y):
308 pass
309
310 class MockConfig:
311 def getini(self, name):
312 return ""
313
314 @property
315 def hook(self):
316 return self
317
318 def pytest_make_parametrize_id(self, **kw):
319 pass
320
321 metafunc = self.Metafunc(func, MockConfig())
322 metafunc.parametrize("y", [])
323 assert "skip" == metafunc._calls[0].marks[0].name
324
325 def test_parametrize_with_userobjects(self) -> None:
326 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