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

Function test_dict_resolver

tests_python/test_resolvers.py:13–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

11
12
13def test_dict_resolver():
14 from _pydevd_bundle.pydevd_resolver import DictResolver
15
16 dict_resolver = DictResolver()
17 dct = {(1, 2): 2, "22": 22}
18 contents_debug_adapter_protocol = clear_contents_debug_adapter_protocol(dict_resolver.get_contents_debug_adapter_protocol(dct))
19 len_entry = contents_debug_adapter_protocol.pop(-1)
20 check_len_entry(len_entry, (GENERATED_LEN_ATTR_NAME, 2))
21 if IS_PY36_OR_GREATER:
22 assert contents_debug_adapter_protocol == [("(1, 2)", 2, "[(1, 2)]"), ("'22'", 22, "['22']")]
23
24 else:
25 assert contents_debug_adapter_protocol == [("'22'", 22, "['22']"), ("(1, 2)", 2, "[(1, 2)]")]
26
27
28def test_dict_resolver_hex():

Callers

nothing calls this directly

Calls 5

DictResolverClass · 0.90
check_len_entryFunction · 0.85
popMethod · 0.80

Tested by

no test coverage detected