MCPcopy Create free account
hub / github.com/apache/arrow / assert_subprocess_calls

Function assert_subprocess_calls

dev/archery/archery/testing.py:52–60  ·  view source on GitHub ↗
(expected_commands_or_calls, **kwargs)

Source from the content-addressed store, hash-verified

50
51@contextmanager
52def assert_subprocess_calls(expected_commands_or_calls, **kwargs):
53 calls = [
54 _ensure_mock_call_object(obj, **kwargs)
55 for obj in expected_commands_or_calls
56 ]
57 with mock.patch('subprocess.run', autospec=True) as run:
58 run.return_value = SuccessfulSubprocessResult()
59 yield run
60 run.assert_has_calls(calls)
61
62
63@contextmanager

Callers 5

assert_docker_callsFunction · 0.90
assert_compose_callsFunction · 0.90
test_compose_pushFunction · 0.90

Calls 2

_ensure_mock_call_objectFunction · 0.85

Tested by

no test coverage detected