()
| 247 | |
| 248 | |
| 249 | def test_assert_never_literal() -> None: |
| 250 | x: Literal["a", "b"] = "a" |
| 251 | |
| 252 | if x == "a": |
| 253 | pass |
| 254 | else: |
| 255 | with pytest.raises(AssertionError): |
| 256 | assert_never(x) # type: ignore[arg-type] |
| 257 | |
| 258 | if x == "a": |
| 259 | pass |
| 260 | elif x == "b": |
| 261 | pass |
| 262 | else: |
| 263 | assert_never(x) |
nothing calls this directly
no test coverage detected