sqlalchemyseed.pytest_plugin

pytest plugin: file-based SQLAlchemy fixtures with per-test rollback.

Registered via the pytest11 entry point. Defines fixtures only — importing this module has no side effects, and it is never imported by the package’s __init__ so production imports never pull in pytest.

Module Contents

sqlalchemyseed.pytest_plugin.engine()

Placeholder the user overrides in their conftest with a real Engine.

sqlalchemyseed.pytest_plugin.seed(sqlalchemyseed_session)

Return a callable that seeds a data file into the test session.

sqlalchemyseed.pytest_plugin.sqlalchemyseed_session(engine)

A Session in an open transaction that is rolled back after the test.