From 0a83145af00d761b65f261bb0598368e0a8b7e40 Mon Sep 17 00:00:00 2001 From: Alex Date: Sat, 29 Aug 2026 12:00:05 +0100 Subject: [PATCH] fix: failing test --- tests/conftest.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index b3b922be..32af1ece 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -62,12 +62,18 @@ from sqlalchemy import create_engine _ALEMBIC_INI = Path(__file__).resolve().parent.parent / "application" / "alembic.ini" -def _migrate_template_db(host, port, user, dbname, password) -> None: +def _migrate_template_db(host, port, user, dbname, password, **kwargs) -> None: """Run alembic ``upgrade head`` into the session's template database. Called once per session by pytest-postgresql's ``load=`` hook (against the template DB, before any test runs). Runs in a subprocess so the parent process never imports application settings with this URI cached. + + ``**kwargs`` swallows keywords newer plugin releases hand to loaders -- + 9.0.0 added ``autocommit``, which broke every DB test on a plugin bump + alone. They describe the connection the caller already gave us, so + ignoring them keeps one signature working across versions instead of + pinning the plugin back. """ url = ( f"postgresql+psycopg://{user}:{password or ''}@{host}:{port}/{dbname}"