#351
(self)
| 458 | assert result == ["Foo.one-Foo.two"] |
| 459 | |
| 460 | def test_idmaker_idfn(self) -> None: |
| 461 | """#351""" |
| 462 | |
| 463 | def ids(val: object) -> Optional[str]: |
| 464 | if isinstance(val, Exception): |
| 465 | return repr(val) |
| 466 | return None |
| 467 | |
| 468 | result = idmaker( |
| 469 | ("a", "b"), |
| 470 | [ |
| 471 | pytest.param(10.0, IndexError()), |
| 472 | pytest.param(20, KeyError()), |
| 473 | pytest.param("three", [1, 2, 3]), |
| 474 | ], |
| 475 | idfn=ids, |
| 476 | ) |
| 477 | assert result == ["10.0-IndexError()", "20-KeyError()", "three-b2"] |
| 478 | |
| 479 | def test_idmaker_idfn_unique_names(self) -> None: |
| 480 | """#351""" |