summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_unittest/testmock/support.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_unittest/testmock/support.py')
-rw-r--r--Lib/test/test_unittest/testmock/support.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/Lib/test/test_unittest/testmock/support.py b/Lib/test/test_unittest/testmock/support.py
new file mode 100644
index 0000000..49986d6
--- /dev/null
+++ b/Lib/test/test_unittest/testmock/support.py
@@ -0,0 +1,16 @@
+target = {'foo': 'FOO'}
+
+
+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