Interview Prep/Python for DevOps/Best practices & rapid-fire commands

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
All Python for DevOps questions Roadmap: Python for automation

More on Best practices & rapid-fire commands