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

Method test_idmaker_native_strings

testing/python/metafunc.py:472–509  ·  testing/python/metafunc.py::TestMetafunc.test_idmaker_native_strings
(self)

Source from the content-addressed store, hash-verified

470 assert result == [class="st">"foo"]
471
472 def test_idmaker_native_strings(self) -> None:
473 result = IdMaker(
474 (class="st">"a", class="st">"b"),
475 [
476 pytest.param(1.0, -1.1),
477 pytest.param(2, -202),
478 pytest.param(class="st">"three", class="st">"three hundred"),
479 pytest.param(True, False),
480 pytest.param(None, None),
481 pytest.param(re.compile(class="st">"foo"), re.compile(class="st">"bar")),
482 pytest.param(str, int),
483 pytest.param(list(class="st">"six"), [66, 66]),
484 pytest.param({7}, set(class="st">"seven")),
485 pytest.param(tuple(class="st">"eight"), (8, -8, 8)),
486 pytest.param(bclass="st">"\xc3\xb4", bclass="st">"name"),
487 pytest.param(bclass="st">"\xc3\xb4", class="st">"other"),
488 pytest.param(1.0j, -2.0j),
489 ],
490 None,
491 None,
492 None,
493 None,
494 ).make_unique_parameterset_ids()
495 assert result == [
496 class="st">"1.0--1.1",
497 class="st">"2--202",
498 class="st">"three-three hundred",
499 class="st">"True-False",
500 class="st">"None-None",
501 class="st">"foo-bar",
502 class="st">"str-int",
503 class="st">"a7-b7",
504 class="st">"a8-b8",
505 class="st">"a9-b9",
506 class="st">"\\xc3\\xb4-name",
507 class="st">"\\xc3\\xb4-other",
508 class="st">"1j-(-0-2j)",
509 ]
510
511 def test_idmaker_non_printable_characters(self) -> None:
512 result = IdMaker(

Callers

nothing calls this directly

Calls 4

IdMakerClass · 0.90
paramMethod · 0.80
compileMethod · 0.80

Tested by

no test coverage detected