pytest-testmon

repository·main·Indexed 21 days ago

https://github.com/tarpas/pytest-testmon

A pytest plugin that selects and re-executes only the tests affected by recent code changes. It builds a dependency database saved to .testmondata to speed up the test cycle by mapping changed files and methods to their corresponding tests.

Tokens
231
Snippets
2
Records
2
Agent score
27%

What's inside pytest-testmon

  1. Build the dependency database and run affected tests

    main

    To 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