()
| 1102 | |
| 1103 | |
| 1104 | def test_pytest_param_id_requires_string() -> None: |
| 1105 | with pytest.raises(TypeError) as excinfo: |
| 1106 | pytest.param(id=True) # type: ignore[arg-type] |
| 1107 | (msg,) = excinfo.value.args |
| 1108 | assert msg == "Expected id to be a string, got <class 'bool'>: True" |
| 1109 | |
| 1110 | |
| 1111 | @pytest.mark.parametrize("s", (None, "hello world")) |