()
| 377 | |
| 378 | |
| 379 | def test_print_method_bound(): |
| 380 | f = HTMLFormatter() |
| 381 | |
| 382 | class MyHTML(object): |
| 383 | def _repr_html_(self): |
| 384 | return "hello" |
| 385 | |
| 386 | with capture_output() as captured: |
| 387 | result = f(MyHTML) |
| 388 | assert result is None |
| 389 | assert "FormatterWarning" not in captured.stderr |
| 390 | |
| 391 | with capture_output() as captured: |
| 392 | result = f(MyHTML()) |
| 393 | assert result == "hello" |
| 394 | assert captured.stderr == "" |
| 395 | |
| 396 | |
| 397 | def test_print_method_weird(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…