Unit test for the expected behavior to obtain ids for parametrized bytes values: bytes objects are always escaped using "binary escape".
(self)
| 340 | assert actual == expected |
| 341 | |
| 342 | def test_bytes_idval(self) -> None: |
| 343 | """Unit test for the expected behavior to obtain ids for parametrized |
| 344 | bytes values: bytes objects are always escaped using "binary escape".""" |
| 345 | values = [ |
| 346 | (b"", r""), |
| 347 | (b"\xc3\xb4\xff\xe4", r"\xc3\xb4\xff\xe4"), |
| 348 | (b"ascii", r"ascii"), |
| 349 | ("αρά".encode(), r"\xce\xb1\xcf\x81\xce\xac"), |
| 350 | ] |
| 351 | for val, expected in values: |
| 352 | assert _idval(val, "a", 6, idfn=None, nodeid=None, config=None) == expected |
| 353 | |
| 354 | def test_class_or_function_idval(self) -> None: |
| 355 | """Unit test for the expected behavior to obtain ids for parametrized |