Rapid fire: pytest commands.
BeginnerConceptBest practices & rapid-fire commands
Answer
pytest -q # quick run
pytest -x --lf # stop at first failure, rerun last failed
pytest -k "sg and not slow" -vv # filter by name expression
pytest tests/test_cli.py::test_exit_code # single test
pytest --cov=src --cov-report=term-missing --cov-fail-under=80
pytest -n auto # parallel (pytest-xdist)
pytest --pdb # drop into debugger on failure
More on Best practices & rapid-fire commands
What does a production-quality automation script always include?IntermediateHow do you handle configuration in a Python tool?IntermediateWhat are the most common security mistakes in Python ops code?AdvancedBash or Python for this task: how do you decide?BeginnerRapid fire: set up a project environment from scratch.BeginnerRapid fire: one-liners useful during an incident.Intermediate