MCPcopy Create free account
hub / github.com/python/cpython / test_mock_call_repr

Method test_mock_call_repr

Lib/test/test_unittest/testmock/testmock.py:1318–1323  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1316
1317
1318 def test_mock_call_repr(self):
1319 m = Mock()
1320 m.foo().bar().baz.bob()
1321 self.assertEqual(repr(m.mock_calls[0]), 'call.foo()')
1322 self.assertEqual(repr(m.mock_calls[1]), 'call.foo().bar()')
1323 self.assertEqual(repr(m.mock_calls[2]), 'call.foo().bar().baz.bob()')
1324
1325
1326 def test_mock_call_repr_loop(self):

Callers

nothing calls this directly

Calls 4

MockClass · 0.90
barMethod · 0.45
fooMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected