()
| 141 | |
| 142 | |
| 143 | def test_assert_never_union() -> None: |
| 144 | x: int | str = 10 |
| 145 | |
| 146 | if isinstance(x, int): |
| 147 | pass |
| 148 | else: |
| 149 | with pytest.raises(AssertionError): |
| 150 | assert_never(x) # type: ignore[arg-type] |
| 151 | |
| 152 | if isinstance(x, int): |
| 153 | pass |
| 154 | elif isinstance(x, str): |
| 155 | pass |
| 156 | else: |
| 157 | assert_never(x) |
| 158 | |
| 159 | |
| 160 | def test_assert_never_enum() -> None: |
nothing calls this directly
no test coverage detected