MCPcopy Index your code
hub / github.com/python/cpython / assertNotCallable

Method assertNotCallable

Lib/test/test_unittest/testmock/testpatch.py:89–96  ·  view source on GitHub ↗
(self, obj, magic=True)

Source from the content-addressed store, hash-verified

87class PatchTest(unittest.TestCase):
88
89 def assertNotCallable(self, obj, magic=True):
90 MockClass = NonCallableMagicMock
91 if not magic:
92 MockClass = NonCallableMock
93
94 self.assertRaises(TypeError, obj)
95 self.assertTrue(is_instance(obj, MockClass))
96 self.assertFalse(is_instance(obj, CallableMixin))
97
98
99 def test_single_patchobject(self):

Callers 4

testMethod · 0.95

Calls 4

is_instanceFunction · 0.90
assertTrueMethod · 0.80
assertFalseMethod · 0.80
assertRaisesMethod · 0.45

Tested by

no test coverage detected