When working with Pytest, it is tempting to keep re-using the same old commands. However, there are some really useful options you can pass in via the command line in order to change the set of tests being run and most likely speed up your workflow.
Take for example, your basic pytest
command as a base:
pytest "project/tests"
The above command is running Pytest out of the 'project/tests' folder.
Here are some useful variations to try for running tests:
pytest "project/tests" -p no:warnings
users pytest "project/tests" --lf
pytest "project/tests" -l
pytest "project/tests" -x
pytest "project/tests" --maxfail=2
pytest "project/tests" -p no:warnings --cov="project"
pytest "project/tests" -p no:warnings --cov="project" --cov-report html
pytest "project/tests" -k registration
pytest "project/tests" --durations=2
Hopefully some of these will help streamline your Pytest-ing workflows!