MCPcopy Create free account
hub / github.com/ipython/ipython / test_lookup

Function test_lookup

IPython/core/tests/test_formatters.py:145–151  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

143 nt.assert_is(f.for_type_by_name(mod, 'C', None), foo_printer)
144
145def test_lookup():
146 f = PlainTextFormatter()
147
148 f.for_type(C, foo_printer)
149 nt.assert_is(f.lookup(C()), foo_printer)
150 with nt.assert_raises(KeyError):
151 f.lookup(A())
152
153def test_lookup_string():
154 f = PlainTextFormatter()

Callers

nothing calls this directly

Calls 5

PlainTextFormatterClass · 0.90
for_typeMethod · 0.80
lookupMethod · 0.80
CClass · 0.70
AClass · 0.70

Tested by

no test coverage detected