()
| 256 | |
| 257 | |
| 258 | def test_pop(): |
| 259 | f = PlainTextFormatter() |
| 260 | f.for_type(C, foo_printer) |
| 261 | assert f.lookup_by_type(C) is foo_printer |
| 262 | assert f.pop(C, None) is foo_printer |
| 263 | f.for_type(C, foo_printer) |
| 264 | assert f.pop(C) is foo_printer |
| 265 | with pytest.raises(KeyError): |
| 266 | f.lookup_by_type(C) |
| 267 | with pytest.raises(KeyError): |
| 268 | f.pop(C) |
| 269 | with pytest.raises(KeyError): |
| 270 | f.pop(A) |
| 271 | assert f.pop(A, None) is None |
| 272 | |
| 273 | |
| 274 | def test_pop_string(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…