From c17caf24ec0d66aa9038c3639086f898d78a0cc4 Mon Sep 17 00:00:00 2001 From: Pavel Date: Thu, 3 Sep 2026 01:00:07 +0400 Subject: [PATCH] fix linter --- tests/conftest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index 5682e183..1fc1211e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -62,12 +62,16 @@ 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, **_loader_options) -> 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. + + ``**_loader_options`` absorbs keyword arguments newer pytest-postgresql + releases pass to loaders (9.0.0 added ``autocommit=``); alembic manages + its own connection, so they are irrelevant here. """ url = ( f"postgresql+psycopg://{user}:{password or ''}@{host}:{port}/{dbname}"