MCPcopy Index your code
hub / github.com/fabioz/PyDev.Debugger / test_object_resolver_simple

Function test_object_resolver_simple

tests_python/test_resolvers.py:43–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41
42
43def test_object_resolver_simple():
44 from _pydevd_bundle.pydevd_resolver import DefaultResolver
45
46 default_resolver = DefaultResolver()
47
48 class MyObject(object):
49 def __init__(self):
50 self.a = 10
51 self.b = 20
52
53 obj = MyObject()
54 dictionary = clear_contents_dictionary(default_resolver.get_dictionary(obj))
55 assert dictionary == {"a": 10, "b": 20}
56
57 contents_debug_adapter_protocol = clear_contents_debug_adapter_protocol(default_resolver.get_contents_debug_adapter_protocol(obj))
58 assert contents_debug_adapter_protocol == [("a", 10, ".a"), ("b", 20, ".b")]
59
60
61def test_object_resolver_error():

Callers

nothing calls this directly

Calls 6

get_dictionaryMethod · 0.95
DefaultResolverClass · 0.90
MyObjectClass · 0.85

Tested by

no test coverage detected