diff --git a/changelog.d/+pytest-9.0.infrastructure.md b/changelog.d/+pytest-9.0.infrastructure.md new file mode 100644 index 00000000..01a4c3d4 --- /dev/null +++ b/changelog.d/+pytest-9.0.infrastructure.md @@ -0,0 +1 @@ +Fix tests with pytest 9.0. \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9bf9279d..318c5a59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,7 @@ format = [ lint = [ "ruff~=0.8.4", "pytest==8.3.3", + "tenacity>=8.2.3,<9", "liccheck>=0.9.2", "setuptools>=60,<80", # required by liccheck ] diff --git a/test/conftest.py b/test/conftest.py index 8f0629b9..6b5f2de8 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -12,6 +12,8 @@ import pytest +pytest_plugins = ['b2sdk.v3.testing'] + @pytest.hookimpl def pytest_configure(config): diff --git a/test/integration/conftest.py b/test/integration/conftest.py index 1a7226d3..035a2bed 100755 --- a/test/integration/conftest.py +++ b/test/integration/conftest.py @@ -47,9 +47,6 @@ GENERAL_BUCKET_NAME_PREFIX = 'clitst' -pytest_plugins = ['b2sdk.v3.testing'] - - @pytest.fixture(scope='session', autouse=True) def summary_notes(request, worker_id): capmanager = request.config.pluginmanager.getplugin('capturemanager') diff --git a/uv.lock b/uv.lock index e954d825..98b0cf36 100644 --- a/uv.lock +++ b/uv.lock @@ -132,6 +132,7 @@ lint = [ { name = "pytest" }, { name = "ruff" }, { name = "setuptools" }, + { name = "tenacity" }, ] nox = [ { name = "nox" }, @@ -191,6 +192,7 @@ lint = [ { name = "pytest", specifier = "==8.3.3" }, { name = "ruff", specifier = "~=0.8.4" }, { name = "setuptools", specifier = ">=60,<80" }, + { name = "tenacity", specifier = ">=8.2.3,<9" }, ] nox = [{ name = "nox", specifier = ">=2025.11.12" }] release = [{ name = "towncrier", specifier = "==23.11.0" }]