()
| 91 | |
| 92 | |
| 93 | def test_print_exception(): |
| 94 | console = Console(width=100, file=io.StringIO()) |
| 95 | try: |
| 96 | 1 / 0 |
| 97 | except Exception: |
| 98 | console.print_exception() |
| 99 | exception_text = console.file.getvalue() |
| 100 | assert "ZeroDivisionError" in exception_text |
| 101 | |
| 102 | |
| 103 | def test_print_exception_no_msg(): |
nothing calls this directly
no test coverage detected