()
| 234 | |
| 235 | |
| 236 | def test_broken_str(): |
| 237 | class BrokenStr(Exception): |
| 238 | def __str__(self): |
| 239 | 1 / 0 |
| 240 | |
| 241 | console = Console(width=100, file=io.StringIO()) |
| 242 | try: |
| 243 | raise BrokenStr() |
| 244 | except Exception: |
| 245 | console.print_exception() |
| 246 | result = console.file.getvalue() |
| 247 | print(result) |
| 248 | assert "<exception str() failed>" in result |
| 249 | |
| 250 | |
| 251 | def test_guess_lexer(): |
nothing calls this directly
no test coverage detected