(self)
| 174 | |
| 175 | class TestTracebackEntry: |
| 176 | def test_getsource(self) -> None: |
| 177 | try: |
| 178 | if False: |
| 179 | pass # type: ignore[unreachable] |
| 180 | else: |
| 181 | assert False |
| 182 | except AssertionError: |
| 183 | exci = ExceptionInfo.from_current() |
| 184 | entry = exci.traceback[0] |
| 185 | source = entry.getsource() |
| 186 | assert source is not None |
| 187 | assert len(source) == 6 |
| 188 | assert "assert False" in source[5] |
| 189 | |
| 190 | def test_tb_entry_str(self): |
| 191 | try: |
nothing calls this directly
no test coverage detected