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

Function test_lookup_string

tests/test_formatters.py:203–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

201
202
203def test_lookup_string():
204 f = PlainTextFormatter()
205 type_str = "%s.%s" % (C.__module__, "C")
206
207 f.for_type(type_str, foo_printer)
208 assert f.lookup(C()) is foo_printer
209 # should move from deferred to imported dict
210 assert _mod_name_key(C) not in f.deferred_printers
211 assert C in f.type_printers
212
213
214def test_lookup_by_type():

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…