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

Method function

Lib/test/test_unittest/testmock/testpatch.py:983–988  ·  view source on GitHub ↗
(mock)

Source from the content-addressed store, hash-verified

981 self.assertRaises(AttributeError, getattr, mock.Bar(), 'b')
982
983 def function(mock):
984 _test(mock)
985 _test2(mock)
986 _test2(mock(1))
987 self.assertIs(mock, Foo)
988 return mock
989
990 test = patch(foo_name, autospec=True)(function)
991

Callers 1

runMethod · 0.45

Calls 2

_testFunction · 0.50
assertIsMethod · 0.45

Tested by

no test coverage detected