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

Method test_idmaker_idfn_unique_names

testing/python/metafunc.py:573–591  ·  testing/python/metafunc.py::TestMetafunc.test_idmaker_idfn_unique_names

#351

(self)

Source from the content-addressed store, hash-verified

571 assert result == [class="st">"10.0-IndexError()", class="st">"20-KeyError()", class="st">"three-b2"]
572
573 def test_idmaker_idfn_unique_names(self) -> None:
574 class="st">""class="st">"class="cm">#351"class="st">""
575
576 def ids(val: object) -> str:
577 return class="st">"a"
578
579 result = IdMaker(
580 (class="st">"a", class="st">"b"),
581 [
582 pytest.param(10.0, IndexError()),
583 pytest.param(20, KeyError()),
584 pytest.param(class="st">"three", [1, 2, 3]),
585 ],
586 ids,
587 None,
588 None,
589 None,
590 ).make_unique_parameterset_ids()
591 assert result == [class="st">"a-a0", class="st">"a-a1", class="st">"a-a2"]
592
593 def test_idmaker_with_idfn_and_config(self) -> None:
594 class="st">"""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