()
| 337 | |
| 338 | |
| 339 | def test_error_pretty_method(): |
| 340 | f = PlainTextFormatter() |
| 341 | |
| 342 | class BadPretty(object): |
| 343 | def _repr_pretty_(self): |
| 344 | return "hello" |
| 345 | |
| 346 | bad = BadPretty() |
| 347 | with capture_output() as captured: |
| 348 | result = f(bad) |
| 349 | assert result is None |
| 350 | assert "Traceback" in captured.stdout |
| 351 | assert "_repr_pretty_" in captured.stdout |
| 352 | assert "given" in captured.stdout |
| 353 | assert "argument" in captured.stdout |
| 354 | |
| 355 | |
| 356 | def test_bad_repr_traceback(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…