MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_object_resolver_hasattr_error

Function test_object_resolver_hasattr_error

tests_python/test_resolvers.py:92–107  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90
91
92def test_object_resolver_hasattr_error():
93 from _pydevd_bundle.pydevd_resolver import DefaultResolver
94 from _pydevd_bundle.pydevd_xml import get_type
95
96 default_resolver = DefaultResolver()
97
98 class MyObject(object):
99 def __getattribute__(self, attr_name):
100 raise RuntimeError()
101
102 obj = MyObject()
103 dictionary = default_resolver.get_dictionary(obj)
104 assert dictionary == {}
105
106 _type_object, type_name, _resolver = get_type(obj)
107 assert type_name == "MyObject"
108
109
110def test_object_resolver__dict__non_strings():

Callers

nothing calls this directly

Calls 3

get_dictionaryMethod · 0.95
DefaultResolverClass · 0.90
MyObjectClass · 0.85

Tested by

no test coverage detected