()
| 176 | |
| 177 | |
| 178 | def test_assert_never_literal() -> None: |
| 179 | x: Literal["a", "b"] = "a" |
| 180 | |
| 181 | if x == "a": |
| 182 | pass |
| 183 | else: |
| 184 | with pytest.raises(AssertionError): |
| 185 | assert_never(x) # type: ignore[arg-type] |
| 186 | |
| 187 | if x == "a": |
| 188 | pass |
| 189 | elif x == "b": |
| 190 | pass |
| 191 | else: |
| 192 | assert_never(x) |
| 193 | |
| 194 | |
| 195 | def test_deprecated() -> None: |
nothing calls this directly
no test coverage detected