A pytest plugin that provides fixtures to preserve test isolation in Flask-SQLAlchemy by using database transactions. It simplifies testing Flask applications with SQLAlchemy by allowing tests to roll back changes automatically. Current version is 1.1.0, with a release cadence of irregular minor updates.
pip install pytest-flask-sqlalchemyVerified import paths — ran on the pinned version, not inferred.
Basic setup with custom app and db fixtures; plugin ensures transaction rollback after each test.
Update dependencies: pip install --upgrade flask-sqlalchemy sqlalchemy
Use Python 3.7 or later.
Upgrade pytest to >=6.0.1.
Use db.session.rollback() or rely on plugin auto-rollback. Avoid explicit commit in tests.
Use 'import pytest_flask_sqlalchemy' (the module itself provides fixtures).
Remove @pytest.mark.flask_sqlalchemy from tests; plugin works implicitly via conftest.
Fixtures are automatically available (e.g., 'db_session'), no need to import them explicitly.
No dependency data recorded yet.