()
| 212 | |
| 213 | |
| 214 | def test_assert_never_union() -> None: |
| 215 | x: Union[int, str] = 10 |
| 216 | |
| 217 | if isinstance(x, int): |
| 218 | pass |
| 219 | else: |
| 220 | with pytest.raises(AssertionError): |
| 221 | assert_never(x) # type: ignore[arg-type] |
| 222 | |
| 223 | if isinstance(x, int): |
| 224 | pass |
| 225 | elif isinstance(x, str): |
| 226 | pass |
| 227 | else: |
| 228 | assert_never(x) |
| 229 | |
| 230 | |
| 231 | def test_assert_never_enum() -> None: |
nothing calls this directly
no test coverage detected