diff --git a/airflow-ctl-tests/pyproject.toml b/airflow-ctl-tests/pyproject.toml index d401975ad73f4..24c7f561ed196 100644 --- a/airflow-ctl-tests/pyproject.toml +++ b/airflow-ctl-tests/pyproject.toml @@ -40,8 +40,15 @@ dependencies = [ "apache-airflow-devel-common", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] + norecursedirs = [ ".eggs", ] diff --git a/airflow-ctl/pyproject.toml b/airflow-ctl/pyproject.toml index 267ec58b5d7ef..8c2fe12a7c5e0 100644 --- a/airflow-ctl/pyproject.toml +++ b/airflow-ctl/pyproject.toml @@ -163,7 +163,7 @@ input = "../airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-ge output = "src/airflowctl/api/datamodels/generated.py" ## pytest settings ## -[tool.pytest.ini_options] +[tool.pytest] addopts = [ "--tb=short", "-rasl", @@ -196,7 +196,7 @@ testpaths = [ ] asyncio_default_fixture_loop_scope = "function" -pythonpath = "tests" +pythonpath = ["tests"] # Keep temporary directories (created by `tmp_path`) for 2 recent runs only failed tests. tmp_path_retention_count = "2" diff --git a/airflow-e2e-tests/pyproject.toml b/airflow-e2e-tests/pyproject.toml index 8b03df204b185..a9406aa2a6feb 100644 --- a/airflow-e2e-tests/pyproject.toml +++ b/airflow-e2e-tests/pyproject.toml @@ -41,8 +41,15 @@ dependencies = [ "boto3>=1.37.2", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] + norecursedirs = [ ".eggs", ] diff --git a/clients/python/pyproject.toml b/clients/python/pyproject.toml index a7a228116413f..59593b1d8dd81 100644 --- a/clients/python/pyproject.toml +++ b/clients/python/pyproject.toml @@ -102,9 +102,14 @@ include = [ "/airflow_client", ] -[tool.pytest.ini_options] +[tool.pytest] # make sure that pytest.ini is not read from pyproject.toml in paraent directories -addopts = "--color=yes --cov-config=pyproject.toml --cov=airflow_client" +addopts = [ + "--color=yes", + "--cov-config=pyproject.toml", + "--cov=airflow_client", +] + norecursedirs = [ ] log_level = "INFO" diff --git a/dev/breeze/pyproject.toml b/dev/breeze/pyproject.toml index 7a08ada848871..9e87dd5399db5 100644 --- a/dev/breeze/pyproject.toml +++ b/dev/breeze/pyproject.toml @@ -89,8 +89,15 @@ name = "airflow_breeze" line-length = 110 target-version = ['py310', 'py311', 'py312'] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] + norecursedirs = [ ".eggs", ] diff --git a/docker-tests/pyproject.toml b/docker-tests/pyproject.toml index 25c20506506bc..fe2ced2cb369d 100644 --- a/docker-tests/pyproject.toml +++ b/docker-tests/pyproject.toml @@ -39,8 +39,14 @@ dependencies = [ "apache-airflow-devel-common", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] norecursedirs = [ ".eggs", ] diff --git a/helm-tests/pyproject.toml b/helm-tests/pyproject.toml index 03d047f388dfa..799fc4cebb70f 100644 --- a/helm-tests/pyproject.toml +++ b/helm-tests/pyproject.toml @@ -39,8 +39,14 @@ dependencies = [ "apache-airflow-providers-cncf-kubernetes", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] norecursedirs = [ ".eggs", ] diff --git a/kubernetes-tests/pyproject.toml b/kubernetes-tests/pyproject.toml index 2ccb1824be15d..bced4f3384ddc 100644 --- a/kubernetes-tests/pyproject.toml +++ b/kubernetes-tests/pyproject.toml @@ -43,8 +43,14 @@ dependencies = [ "requests>=2.32.0,<3", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] norecursedirs = [ ".eggs", ] diff --git a/pyproject.toml b/pyproject.toml index 674a8d12fce8a..8682a8544c9f0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -906,7 +906,7 @@ mark-parentheses = false fixture-parentheses = false ## pytest settings ## -[tool.pytest.ini_options] +[tool.pytest] addopts = [ "--tb=short", "-rasl", diff --git a/task-sdk-integration-tests/pyproject.toml b/task-sdk-integration-tests/pyproject.toml index 86fdb7922654c..100ed5ee9ddb0 100644 --- a/task-sdk-integration-tests/pyproject.toml +++ b/task-sdk-integration-tests/pyproject.toml @@ -40,8 +40,14 @@ dependencies = [ "apache-airflow-devel-common", ] -[tool.pytest.ini_options] -addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath" +[tool.pytest] +addopts = [ + "-rasl", + "--verbosity=2", + "-p", "no:flaky", + "-p", "no:nose", + "-p", "no:legacypath", +] norecursedirs = [ ".eggs", ] diff --git a/task-sdk/pyproject.toml b/task-sdk/pyproject.toml index 4a83e9c328784..2ba2764acdf24 100644 --- a/task-sdk/pyproject.toml +++ b/task-sdk/pyproject.toml @@ -205,7 +205,7 @@ url = 'http://0.0.0.0:8080/execution/openapi.json' output = 'src/airflow/sdk/api/datamodels/_generated.py' ## pytest settings ## -[tool.pytest.ini_options] +[tool.pytest] addopts = [ "--tb=short", "-rasl", @@ -236,7 +236,7 @@ testpaths = [ ] asyncio_default_fixture_loop_scope = "function" -pythonpath = "tests" +pythonpath = ["tests"] # Keep temporary directories (created by `tmp_path`) for 2 recent runs only failed tests. tmp_path_retention_count = "2"