From c1cf89e3bf754635bd66e0f6b605dfd22696212e Mon Sep 17 00:00:00 2001 From: Sorin Sbarnea Date: Thu, 9 Jan 2025 17:21:47 +0000 Subject: [PATCH] Minor pytest improvements --- .config/constraints.txt | 13 +++++++------ .config/requirements-test.in | 1 + .pre-commit-config.yaml | 2 +- tests/integration/test_container.py | 2 +- tests/integration/test_server_creator_v1.py | 2 +- tests/integration/test_server_creator_v2.py | 2 +- tox.ini | 1 + 7 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.config/constraints.txt b/.config/constraints.txt index 7ce2f303..cfd603b5 100644 --- a/.config/constraints.txt +++ b/.config/constraints.txt @@ -49,7 +49,7 @@ griffe==1.5.4 gunicorn==23.0.0 hjson==3.1.0 htmlmin2==0.1.13 -identify==2.6.3 +identify==2.6.5 idna==3.10 importlib-metadata==8.5.0 iniconfig==2.0.0 @@ -87,7 +87,7 @@ mkdocstrings==0.27.0 mkdocstrings-python==1.13.0 molecule==24.12.0 more-itertools==10.5.0 -mypy==1.14.0 +mypy==1.14.1 mypy-extensions==1.0.0 nodeenv==1.9.1 onigurumacffi==1.3.0 @@ -102,7 +102,7 @@ pathable==0.4.3 pathspec==0.12.1 pbr==6.1.0 pexpect==4.9.0 -pillow==11.0.0 +pillow==11.1.0 platformdirs==4.3.6 pluggy==1.5.0 pre-commit==4.0.1 @@ -111,11 +111,12 @@ pycparser==2.22 pydoclint==0.5.14 pygments==2.18.0 pylint==3.3.3 -pymdown-extensions==10.13 +pymdown-extensions==10.14 pyproject-api==1.8.0 pytest==8.3.4 pytest-ansible==24.12.0 pytest-instafail==0.5.0 +pytest-plus==0.7.0 pytest-xdist==3.6.1 python-daemon==3.1.2 python-dateutil==2.9.0.post0 @@ -131,7 +132,7 @@ rich==13.9.4 rpds-py==0.22.3 ruamel-yaml==0.18.6 ruamel-yaml-clib==0.2.12 -ruff==0.8.4 +ruff==0.9.0 six==1.17.0 soupsieve==2.6 sqlparse==0.5.3 @@ -144,7 +145,7 @@ toml-sort==0.24.2 tomlkit==0.13.2 tox==4.23.2 tox-ansible==24.12.0 -types-pyyaml==6.0.12.20241221 +types-pyyaml==6.0.12.20241230 types-requests==2.32.0.20241016 tzdata==2024.2 urllib3==2.3.0 diff --git a/.config/requirements-test.in b/.config/requirements-test.in index 12411b65..3c242a91 100644 --- a/.config/requirements-test.in +++ b/.config/requirements-test.in @@ -9,6 +9,7 @@ pydoclint pylint pytest pytest-instafail +pytest-plus pytest-xdist requests ruff diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4dfdcb90..db070e74 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: - id: tox-ini-fmt - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.8.6 + rev: v0.9.0 hooks: - id: ruff args: diff --git a/tests/integration/test_container.py b/tests/integration/test_container.py index a09a2a4a..fbb9c573 100644 --- a/tests/integration/test_container.py +++ b/tests/integration/test_container.py @@ -12,7 +12,7 @@ from ansible_dev_tools.version_builder import PKGS from .test_server_creator_v1 import test_collection_v1 as tst_collection_v1 -from .test_server_creator_v1 import test_error as tst_error +from .test_server_creator_v1 import test_error_v1 as tst_error from .test_server_creator_v1 import test_playbook_v1 as tst_playbook_v1 from .test_server_info import test_metadata as tst_get_metadata diff --git a/tests/integration/test_server_creator_v1.py b/tests/integration/test_server_creator_v1.py index 8dfe5b58..f003c9e6 100644 --- a/tests/integration/test_server_creator_v1.py +++ b/tests/integration/test_server_creator_v1.py @@ -15,7 +15,7 @@ @pytest.mark.parametrize("resource", ("playbook", "collection")) -def test_error(server_url: str, resource: str) -> None: +def test_error_v1(server_url: str, resource: str) -> None: """Test the error response. Args: diff --git a/tests/integration/test_server_creator_v2.py b/tests/integration/test_server_creator_v2.py index bcbc0385..4e544bfb 100644 --- a/tests/integration/test_server_creator_v2.py +++ b/tests/integration/test_server_creator_v2.py @@ -15,7 +15,7 @@ @pytest.mark.parametrize("resource", ("playbook", "collection")) -def test_error(server_url: str, resource: str) -> None: +def test_error_v2(server_url: str, resource: str) -> None: """Test the error response. Args: diff --git a/tox.ini b/tox.ini index 66d1548f..867dddc2 100644 --- a/tox.ini +++ b/tox.ini @@ -142,6 +142,7 @@ commands = ./tools/ee.sh allowlist_externals = ./tools/ee.sh +editable = true [testenv:devspaces] description = Build devspaces container image for current architecture