In a fairly big project, rerunning the whole test suite can take a while, so it's not always feasible to rerun all tests on every code change. We might settle for rerunning all tests only when we commit a stable point of the code and run just a subset of them on every code change before we decide whether to commit our changes.
This approach is usually naturally moved forward by developers who tend to pick a single test, a test case, or a subset of tests that can act as canaries for their code changes.
For example, if I'm modifying the persistence layer of our contacts application, I would probably rerun all tests that involve the save or load keywords:
$ pytest -k save -k load --ignore benchmarks -v
...
tests/functional/test_basic.py::TestStorage::test_reload PASSED [ 50%]
tests/unit/test_persistence.py::TestLoading::test_load PASSED [100%]
Once those canary tests pass, I would rerun the whole test suite to confirm that I actually...