#250
(self)
| 374 | assert _idval(NOTSET, "a", 0, None, nodeid=None, config=None) == "a0" |
| 375 | |
| 376 | def test_idmaker_autoname(self) -> None: |
| 377 | """#250""" |
| 378 | result = idmaker( |
| 379 | ("a", "b"), [pytest.param("string", 1.0), pytest.param("st-ring", 2.0)] |
| 380 | ) |
| 381 | assert result == ["string-1.0", "st-ring-2.0"] |
| 382 | |
| 383 | result = idmaker( |
| 384 | ("a", "b"), [pytest.param(object(), 1.0), pytest.param(object(), object())] |
| 385 | ) |
| 386 | assert result == ["a0-1.0", "a1-b1"] |
| 387 | # unicode mixing, issue250 |
| 388 | result = idmaker(("a", "b"), [pytest.param({}, b"\xc3\xb4")]) |
| 389 | assert result == ["a0-\\xc3\\xb4"] |
| 390 | |
| 391 | def test_idmaker_with_bytes_regex(self) -> None: |
| 392 | result = idmaker(("a"), [pytest.param(re.compile(b"foo"), 1.0)]) |