()
| 216 | nt.assert_is(f.pop(A, None), None) |
| 217 | |
| 218 | def test_pop_string(): |
| 219 | f = PlainTextFormatter() |
| 220 | type_str = '%s.%s' % (C.__module__, 'C') |
| 221 | |
| 222 | with nt.assert_raises(KeyError): |
| 223 | f.pop(type_str) |
| 224 | |
| 225 | f.for_type(type_str, foo_printer) |
| 226 | f.pop(type_str) |
| 227 | with nt.assert_raises(KeyError): |
| 228 | f.lookup_by_type(C) |
| 229 | with nt.assert_raises(KeyError): |
| 230 | f.pop(type_str) |
| 231 | |
| 232 | f.for_type(C, foo_printer) |
| 233 | nt.assert_is(f.pop(type_str, None), foo_printer) |
| 234 | with nt.assert_raises(KeyError): |
| 235 | f.lookup_by_type(C) |
| 236 | with nt.assert_raises(KeyError): |
| 237 | f.pop(type_str) |
| 238 | nt.assert_is(f.pop(type_str, None), None) |
| 239 | |
| 240 | |
| 241 | def test_error_method(): |
nothing calls this directly
no test coverage detected