MCPcopy Index your code
hub / github.com/pytest-dev/pytest / test_idmaker_idfn_unique_names

Method test_idmaker_idfn_unique_names

testing/python/metafunc.py:573–591  ·  view source on GitHub ↗

#351

(self)

Source from the content-addressed store, hash-verified

571 assert result == ["10.0-IndexError()", "20-KeyError()", "three-b2"]
572
573 def test_idmaker_idfn_unique_names(self) -> None:
574 """#351"""
575
576 def ids(val: object) -> str:
577 return "a"
578
579 result = IdMaker(
580 ("a", "b"),
581 [
582 pytest.param(10.0, IndexError()),
583 pytest.param(20, KeyError()),
584 pytest.param("three", [1, 2, 3]),
585 ],
586 ids,
587 None,
588 None,
589 None,
590 ).make_unique_parameterset_ids()
591 assert result == ["a-a0", "a-a1", "a-a2"]
592
593 def test_idmaker_with_idfn_and_config(self) -> None:
594 """Unit test for expected behavior to create ids with idfn and

Callers

nothing calls this directly

Calls 3

IdMakerClass · 0.90
paramMethod · 0.80

Tested by

no test coverage detected