From 835c1119bed3df5249b3422518c27981085983ec Mon Sep 17 00:00:00 2001 From: LN Liberda Date: Tue, 16 Dec 2025 17:56:12 +0100 Subject: [PATCH] Move pytest_plugins to top-level conftest https://docs.pytest.org/en/stable/deprecations.html#pytest-plugins-in-non-top-level-conftest-files --- ...ytest_plugins-toplevel-conftest.infrastructure.md | 1 + pyproject.toml | 1 + test/conftest.py | 2 ++ test/integration/conftest.py | 12 ------------ 4 files changed, 4 insertions(+), 12 deletions(-) create mode 100644 changelog.d/+pytest_plugins-toplevel-conftest.infrastructure.md delete mode 100644 test/integration/conftest.py diff --git a/changelog.d/+pytest_plugins-toplevel-conftest.infrastructure.md b/changelog.d/+pytest_plugins-toplevel-conftest.infrastructure.md new file mode 100644 index 000000000..2d9b019de --- /dev/null +++ b/changelog.d/+pytest_plugins-toplevel-conftest.infrastructure.md @@ -0,0 +1 @@ +Move pytest_plugins to top-level conftest (fix for newer pytest). \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7f6bc4bae..02c2ac97a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -158,6 +158,7 @@ format = [ lint = [ "ruff~=0.8.4", "pytest>=8.3.3", + "tenacity>=9.1.2", "liccheck==0.9.2", "setuptools", ] diff --git a/test/conftest.py b/test/conftest.py index 5cfa81b52..489730dd6 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -11,6 +11,8 @@ import pytest +pytest_plugins = ['b2sdk.v3.testing'] + @pytest.fixture def bg_executor(): diff --git a/test/integration/conftest.py b/test/integration/conftest.py deleted file mode 100644 index 90cfcf141..000000000 --- a/test/integration/conftest.py +++ /dev/null @@ -1,12 +0,0 @@ -###################################################################### -# -# File: test/integration/conftest.py -# -# Copyright 2021 Backblaze Inc. All Rights Reserved. -# -# License https://www.backblaze.com/using_b2_code.html -# -###################################################################### - - -pytest_plugins = ['b2sdk.v3.testing']