Skip to main content
Usama Jalal
Creator of pytest-web
View all authors

Stop editing your test files just to run a subset — use pytest-web instead

· 5 min read
Usama Jalal
Creator of pytest-web

You've been there. You have a test file with 40 parametrized cases. You need to run 3 of them. So you open the file, comment out the ones you don't want, run pytest, then uncomment everything again. Or you try to remember the exact -k expression. Or you copy-paste a node ID from the terminal and hope you got it right.

There's a better way.