Debian Codegraph @

Lib/test/test_unittest/testmock/support.py

raw
1 target = {'foo': 'FOO'}
2
3
4 def is_instance(obj, klass):
5 """Version of is_instance that doesn't access __class__"""
6 return issubclass(type(obj), klass)
7
8
9 class SomeClass(object):
10 class_attribute = None
11
12 def wibble(self): pass
13
14
15 class X(object):
16 pass
17
18 # A standin for weurkzeug.local.LocalProxy - issue 119600
19 def _inaccessible(*args, **kwargs):
20 raise AttributeError
21
22
23 class OpaqueProxy:
24 __getattribute__ = _inaccessible
25
26
27 g = OpaqueProxy()