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

Method wait_until_any_call_with

Lib/unittest/mock.py:3138–3146  ·  view source on GitHub ↗

Wait until the mock object is called with given args. Waits for the timeout in seconds provided in the constructor.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

3136 raise AssertionError(msg)
3137
3138 def wait_until_any_call_with(self, *args, **kwargs):
3139 """Wait until the mock object is called with given args.
3140
3141 Waits for the timeout in seconds provided in the constructor.
3142 """
3143 event = self.__get_event(args, kwargs)
3144 if not event.wait(timeout=self._mock_wait_timeout):
3145 expected_string = self._format_mock_call_signature(args, kwargs)
3146 raise AssertionError(f'{expected_string} call not found')
3147
3148
3149class ThreadingMock(ThreadingMixin, MagicMixin, Mock):

Calls 3

__get_eventMethod · 0.95
waitMethod · 0.45