Description
Fakes subprocess calls in pytest tests. It helps developers test command-running code by controlling expected commands, exit codes, stdout, stderr, and failure paths.
Subprocess mocks should match real command behavior closely. Keep separate integration tests for critical commands that modify files or systems.