MCPcopy Index your code
hub / github.com/ipython/ipython / test_pop

Function test_pop

tests/test_formatters.py:258–271  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

256
257
258def 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
274def test_pop_string():

Callers

nothing calls this directly

Calls 4

PlainTextFormatterClass · 0.90
for_typeMethod · 0.80
lookup_by_typeMethod · 0.80
popMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…