()
| 310 | nt.assert_equal(f(pdf), 'PDF') |
| 311 | |
| 312 | def test_print_method_bound(): |
| 313 | f = HTMLFormatter() |
| 314 | class MyHTML(object): |
| 315 | def _repr_html_(self): |
| 316 | return "hello" |
| 317 | with capture_output() as captured: |
| 318 | result = f(MyHTML) |
| 319 | nt.assert_is(result, None) |
| 320 | nt.assert_not_in("FormatterWarning", captured.stderr) |
| 321 | |
| 322 | with capture_output() as captured: |
| 323 | result = f(MyHTML()) |
| 324 | nt.assert_equal(result, "hello") |
| 325 | nt.assert_equal(captured.stderr, "") |
| 326 | |
| 327 | def test_print_method_weird(): |
| 328 |
nothing calls this directly
no test coverage detected