pytest-incremental 0.2.0

An incremental test runner (pytest plugin)

  Add it to your Download Basket!

 Add it to your Watch List!


Rate it!
send us
an update
MIT/X Consortium License 
Eduardo Naufel Schettino
ROOT \ Programming \ Quality Assurance and Testing
pytest-incremental is an incremental test runner (pytest plugin).

What is an "incremental test runner" ?

When talking about build-tools it is common to refer to the terms:

- initial (full) build - all files are compiled
- incremental build (or partial rebuild) - just changed files are compiled
- no-op build - no files are compiled (none changed since last execution)

So an "incremental test runner" will only re-execute tests that were affected by changes in the source code since last test execution.

How it works ?

pytest-incremental is a pytest plugin. So if you can run your test suite with pytest you can use pytest-incremental.

The plugin will analyse your python source files and through its imports define the dependencies of the modules. doit is used to keep track of the dependencies and save results. The plugin will modify how pytest collect your tests. pytest do the rest of the job of actually running the tests and reporting the results.


pytest-incremental is tested on python 2.6, 2.7.

pip install pytest-incremental`

python install

local installation

You can also just grab the plugin module file and put in your project path. Then enable it (check pytest docs).


Just pass the parameter --incremental when calling from the command line:

py.test --incremental

You can also enable it by default adding the following line to your pytest.ini:

addopts = --incremental

watched packages

By default all modules collected by pytest will used as dependencies if imported. In order to limit or extend the watched folders you must use the parameter --watch-pkg

Last updated on May 10th, 2011

requirements limitations

#test runner #pytest plugin #pytest #test #runner #incremental

Add your review!