()
| 272 | |
| 273 | |
| 274 | def test_pop_string(): |
| 275 | f = PlainTextFormatter() |
| 276 | type_str = "%s.%s" % (C.__module__, "C") |
| 277 | |
| 278 | with pytest.raises(KeyError): |
| 279 | f.pop(type_str) |
| 280 | |
| 281 | f.for_type(type_str, foo_printer) |
| 282 | f.pop(type_str) |
| 283 | with pytest.raises(KeyError): |
| 284 | f.lookup_by_type(C) |
| 285 | with pytest.raises(KeyError): |
| 286 | f.pop(type_str) |
| 287 | |
| 288 | f.for_type(C, foo_printer) |
| 289 | assert f.pop(type_str, None) is foo_printer |
| 290 | with pytest.raises(KeyError): |
| 291 | f.lookup_by_type(C) |
| 292 | with pytest.raises(KeyError): |
| 293 | f.pop(type_str) |
| 294 | assert f.pop(type_str, None) is None |
| 295 | |
| 296 | |
| 297 | def test_error_method(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…