ยปCore Development>Code coverage>Lib/unittest/test/testmock/support.py

Python code coverage for Lib/unittest/test/testmock/support.py

#countcontent
1n/adef is_instance(obj, klass):
2n/a """Version of is_instance that doesn't access __class__"""
3n/a return issubclass(type(obj), klass)
4n/a
5n/a
6n/aclass SomeClass(object):
7n/a class_attribute = None
8n/a
9n/a def wibble(self):
10n/a pass
11n/a
12n/a
13n/aclass X(object):
14n/a pass
15n/a
16n/a
17n/adef examine_warnings(func):
18n/a def wrapper():
19n/a with catch_warnings(record=True) as ws:
20n/a func(ws)
21n/a return wrapper