https://devhubby.com/thread/how-to-change-error-and-failure-detection-in-pytest