Welcome to pytest-flask’s documentation!

Pytest-flask is a plugin for pytest that provides a set of useful tools to test Flask applications and extensions.


Install plugin via pip:

pip install pytest-flask

Define your application fixture in conftest.py:

from myapp import create_app

def app():
    app = create_app()
    return app

And run your test suite:



Don’t hesitate to create a GitHub issue for any bug or suggestion.