Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
opt
/
python-3.7
/
usr
/
lib
/
python3.7
/
unittest
/
test
/
testmock
/
//opt/python-3.7/usr/lib/python3.7/unittest/test/testmock/support.py
def is_instance(obj, klass): """Version of is_instance that doesn't access __class__""" return issubclass(type(obj), klass) class SomeClass(object): class_attribute = None def wibble(self): pass class X(object): pass def examine_warnings(func): def wrapper(): with catch_warnings(record=True) as ws: func(ws) return wrapper