Testing

Test runners

Name Short description 🚦
pytest A framework for writing and running tests. We recommend pytest over unittest because pytest tends to encourage a cleaner style, there are also extensive plugins and it’s in widespread use. 🟢
tox A framework that allows running tests and packaging in different environments. 🟢
unittest Python’s built in framework for writing and running tests. Encourages use of classes as test fixtures. 🟠

pytest plugins

Name Short description 🚦
pytest-cov A framework to generate coverage reports that plays nicely with pytest. 🟢
pytest-mock A framework to mock/patch objects that plays nicely with pytest. 🟢
pyfakefs A plugin to create a full fake file system, for situations where you need something more complicated than the built in tmp_path fixture. 🟢

Property based testing

Name Short description 🚦
Hypothesis Allows one to easily test multiple inputs for a given function with ease 🟢