From 12cc34afbf3b1556ccdde87c8ef9c2817a90116f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 17:05:57 +0000 Subject: [PATCH 1/2] chore(deps): update dependency pytest to v9 --- pyproject.toml | 2 +- uv.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0aa79b70..f7bad68f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ dev = [ "mysqlclient==2.2.7", "pre-commit==4.4.0", "pymysql==1.1.2", - "pytest==8.4.2", + "pytest==9.0.1", "pytest-alembic==0.12.1", "python-dotenv==1.2.1", "ruff==0.14.4", diff --git a/uv.lock b/uv.lock index 8e7f4e00..c01723ee 100644 --- a/uv.lock +++ b/uv.lock @@ -77,7 +77,7 @@ dev = [ { name = "mysqlclient", specifier = "==2.2.7" }, { name = "pre-commit", specifier = "==4.4.0" }, { name = "pymysql", specifier = "==1.1.2" }, - { name = "pytest", specifier = "==8.4.2" }, + { name = "pytest", specifier = "==9.0.1" }, { name = "pytest-alembic", specifier = "==0.12.1" }, { name = "python-dotenv", specifier = "==1.2.1" }, { name = "ruff", specifier = "==0.14.4" }, @@ -301,7 +301,7 @@ wheels = [ [[package]] name = "pytest" -version = "8.4.2" +version = "9.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "colorama", marker = "sys_platform == 'win32'" }, @@ -310,9 +310,9 @@ dependencies = [ { name = "pluggy" }, { name = "pygments" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } +sdist = { url = "https://files.pythonhosted.org/packages/07/56/f013048ac4bc4c1d9be45afd4ab209ea62822fb1598f40687e6bf45dcea4/pytest-9.0.1.tar.gz", hash = "sha256:3e9c069ea73583e255c3b21cf46b8d3c56f6e3a1a8f6da94ccb0fcf57b9d73c8", size = 1564125, upload-time = "2025-11-12T13:05:09.333Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, + { url = "https://files.pythonhosted.org/packages/0b/8b/6300fb80f858cda1c51ffa17075df5d846757081d11ab4aa35cef9e6258b/pytest-9.0.1-py3-none-any.whl", hash = "sha256:67be0030d194df2dfa7b556f2e56fb3c3315bd5c8822c6951162b92b32ce7dad", size = 373668, upload-time = "2025-11-12T13:05:07.379Z" }, ] [[package]] From 357cc250e156b44f1824680bbb33b1eb8b4f5733 Mon Sep 17 00:00:00 2001 From: Matthias Schoettle Date: Fri, 14 Nov 2025 14:50:40 -0500 Subject: [PATCH 2/2] migrate to pytest.toml --- pytest.ini => pytest.toml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) rename pytest.ini => pytest.toml (77%) diff --git a/pytest.ini b/pytest.toml similarity index 77% rename from pytest.ini rename to pytest.toml index e05e5a18..22e5e848 100644 --- a/pytest.ini +++ b/pytest.toml @@ -1,17 +1,15 @@ -; SPDX-FileCopyrightText: Copyright (C) 2024 Opal Health Informatics Group at the Research Institute of the McGill University Health Centre -; -; SPDX-License-Identifier: AGPL-3.0-or-later +# SPDX-FileCopyrightText: Copyright (C) 2024 Opal Health Informatics Group at the Research Institute of the McGill University Health Centre +# SPDX-License-Identifier: AGPL-3.0-or-later # see: https://docs.pytest.org/en/stable/reference/reference.html#ini-options-ref -[pytest] -console_output_style = times -python_files = tests.py test_*.py +console_output_style = "times" # treat warnings as errors to fail tests early # modify here to exclude certain warnings if necessary # see: https://til.simonwillison.net/pytest/treat-warnings-as-errors -filterwarnings = - error +filterwarnings = [ + "error", # ignore foreign key cycles # sqlalchemy.exc.SAWarning: Cannot correctly sort tables; there are unresolvable cycles between tables "QuestionnaireDB.dictionary, QuestionnaireDB.language", which is usually caused by mutually dependent foreign key constraints. Foreign key constraints involving these tables will not be considered; this warning may raise an error in a future release. # sqlalchemy.exc.SAWarning: Cannot correctly sort tables; there are unresolvable cycles between tables "dictionary, language", which is usually caused by mutually dependent foreign key constraints. Foreign key constraints involving these tables will not be considered; this warning may raise an error in a future release. - ignore:Cannot correctly sort tables.*unresolvable cycles.*dictionary.*language:sqlalchemy.exc.SAWarning + "ignore:Cannot correctly sort tables.*unresolvable cycles.*dictionary.*language:sqlalchemy.exc.SAWarning", +]