@@ -82,7 +82,7 @@ dev = [
8282 " psutil>=7.0.0" ,
8383 " pylint>=3.3.8" ,
8484 " pyrsistent>=0.20.0" ,
85- " pytest>=7.2.2 " ,
85+ " pytest>=9 " ,
8686 " pytest-instafail>=0.5.0" ,
8787 " pytest-mock>=3.15.0" ,
8888 " pytest-plus>=0.8.1" ,
@@ -102,7 +102,7 @@ lint = [
102102 " pip>=25.2" ,
103103 " pre-commit>=4.1" ,
104104 " pre-commit-uv>=4.1.4" ,
105- " pytest>=7.2.2 " ,
105+ " pytest>=9 " ,
106106 " setuptools>=51.1.1" ,
107107]
108108pkg = [
@@ -460,19 +460,15 @@ reportPossiblyUnboundVariable = false
460460reportPrivateImportUsage = false
461461
462462# spell-checker:ignore filterwarnings norecursedirs optionflags
463- [tool .pytest . ini_options ]
463+ [tool .pytest ]
464464# do not add options here as this will likely break either console runs or IDE
465465# integration like vscode or pycharm
466- addopts = " -p no:pytest_cov -- durations=10 --failed-first"
466+ addopts = [ " -- durations=10" , " --failed-first" , " -p no:pytest_cov " ]
467467doctest_optionflags = [" ALLOW_UNICODE" , " ELLIPSIS" ]
468468filterwarnings = [
469- " error" ,
470- # https://sourceforge.net/p/ruamel-yaml/tickets/452/
471- " ignore:Deprecated call to `pkg_resources.declare_namespace:DeprecationWarning" ,
472- # https://github.com/spdx/tools-python/issues/507
473- " ignore:pkg_resources is deprecated as an API:DeprecationWarning" ,
474469 # We raise one non critical warning from our own conftest.py:
475470 " always::pytest.PytestWarning" ,
471+ " error" ,
476472 # py312 ansible-core
477473 # https://github.com/ansible/ansible/issues/81906
478474 " ignore:'importlib.abc.TraversableResources' is deprecated and slated for removal in Python 3.14:DeprecationWarning" ,
@@ -491,11 +487,11 @@ norecursedirs = [
491487 " .cache" ,
492488 " .config" ,
493489 " .eggs" ,
490+ " .eggs" ,
494491 " .git" ,
495492 " .github" ,
496493 " .mypy_cache" ,
497494 " .projects" ,
498- " .eggs" ,
499495 " .tox" ,
500496 " __pycache__" ,
501497 " ansible_collections" ,
@@ -510,17 +506,17 @@ norecursedirs = [
510506 " test/schemas" ,
511507]
512508python_files = [
513- " test_*.py" ,
514509 # Ref: https://docs.pytest.org/en/latest/reference.html#confval-python_files
515510 # Needed to discover legacy nose test modules:
516511 " Test*.py" ,
517512 # Needed to discover embedded Rule tests
518513 " rules/*.py" ,
514+ " test_*.py" ,
519515]
520516# Using --pyargs instead of testpath as we embed some tests
521517# See: https://github.com/pytest-dev/pytest/issues/6451#issuecomment-687043537
522518# testpaths =
523- xfail_strict = true
519+ strict_xfail = true
524520
525521[tool .ruff ]
526522cache-dir = " ./.cache/.ruff"
0 commit comments