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

Method test

Lib/test/test_unittest/testmock/testpatch.py:104–105  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

102
103 @patch.object(Something, 'attribute', sentinel.Patched)
104 def test():
105 self.assertEqual(Something.attribute, sentinel.Patched, "unpatched")
106
107 test()
108 self.assertEqual(Something.attribute, sentinel.Original,

Callers

nothing calls this directly

Calls 15

assertNotCallableMethod · 0.95
is_instanceFunction · 0.90
assertIsNoneMethod · 0.80
assertIsInstanceMethod · 0.80
assertNotEqualMethod · 0.80
assertTrueMethod · 0.80
assertInMethod · 0.80
assert_not_calledMethod · 0.80
assert_called_withMethod · 0.80
assert_calledMethod · 0.80
assert_called_onceMethod · 0.80
functionFunction · 0.70

Tested by

no test coverage detected