pytest only view tests that failed in previous run code example Example: pytest run only failed test pytest --last-failed