Skip to content

.tip

· one of the small things

pytest -x --lf when you are fixing a failure

-x stops at the first failure, and --lf only runs the tests that failed last time. Together they turn a five minute suite into a five second loop while you work on whatever's broken.

pytest -x --lf

When you think you've fixed it, --ff runs the failures first and then everything else.

pythontesting