This is a pytest plugin to fake the real subprocess behavior to make your tests more independent.


You can use the provided fake_process (or fp for short) fixture to register commands and specify their behavior before they will be executed. This will prevent a real subprocess execution.

def test_process(fp):
    process =["fake-command"])

    assert process.returncode == 0

Table of contents

Indices and tables