Raise ValueError if the value is outside our options when the options are specified as a string and the value is not a string.
(self)
| 431 | ) == e.value.args |
| 432 | |
| 433 | def test_fail_with_string(self): |
| 434 | class="st">""" |
| 435 | Raise ValueError if the value is outside our options when the |
| 436 | options are specified as a string and the value is not a string. |
| 437 | class="st">""" |
| 438 | v = in_(class="st">"abc") |
| 439 | a = simple_attr(class="st">"test") |
| 440 | with pytest.raises(ValueError) as e: |
| 441 | v(None, a, None) |
| 442 | assert ( |
| 443 | class="st">"&class="cm">#x27;test' must be in 'abc' (got None)", |
| 444 | a, |
| 445 | class="st">"abc", |
| 446 | None, |
| 447 | ) == e.value.args |
| 448 | |
| 449 | def test_repr(self): |
| 450 | class="st">""" |
nothing calls this directly
no test coverage detected