The most important method is fp.register() (or register_subprocess if you prefer to be more verbose), which allows defining the fake processes behavior. The fp fixture provides context() method that ...
This example repository showcases how to test command line programs using pytest and subprocess. Note that it can used to test any kind of program that read from stdin and write to stdout. In other ...