Build the dependency database and run affected tests
mainTo use pytest-testmon, you must first build a dependency database. Running pytest --testmon for the first time will execute your tests and save the dependency mapping to a file named .testmondata.
After the database is built, any subsequent changes to your code will allow you to run pytest --testmon again to execute only the tests affected by those recent changes.
# 1. Build the dependency database and save it to .testmondata
pytest --testmon
# 2. (After changing code) Only run tests affected by recent changes
pytest --testmon