I recently found that my pytest was giving a false pass. The pytest made a system call to copy a file , whose path was incorrect. That file overrode a function in the default test.
I know I can check if the file is there and do an assert on the return value of the check.
However is there a way to have pytest recognise a failed system call and give a fail ?