Skip to content

Commit 0534b90

Browse files
authored
Update pyproject.toml files with pytest>=9.0.0 TOML syntax (apache#58182)
1 parent 23ddfd2 commit 0534b90

File tree

11 files changed

+71
-21
lines changed

11 files changed

+71
-21
lines changed

airflow-ctl-tests/pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,15 @@ dependencies = [
4040
"apache-airflow-devel-common",
4141
]
4242

43-
[tool.pytest.ini_options]
44-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
43+
[tool.pytest]
44+
addopts = [
45+
"-rasl",
46+
"--verbosity=2",
47+
"-p", "no:flaky",
48+
"-p", "no:nose",
49+
"-p", "no:legacypath",
50+
]
51+
4552
norecursedirs = [
4653
".eggs",
4754
]

airflow-ctl/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ input = "../airflow-core/src/airflow/api_fastapi/core_api/openapi/v2-rest-api-ge
163163
output = "src/airflowctl/api/datamodels/generated.py"
164164

165165
## pytest settings ##
166-
[tool.pytest.ini_options]
166+
[tool.pytest]
167167
addopts = [
168168
"--tb=short",
169169
"-rasl",
@@ -196,7 +196,7 @@ testpaths = [
196196
]
197197
asyncio_default_fixture_loop_scope = "function"
198198

199-
pythonpath = "tests"
199+
pythonpath = ["tests"]
200200

201201
# Keep temporary directories (created by `tmp_path`) for 2 recent runs only failed tests.
202202
tmp_path_retention_count = "2"

airflow-e2e-tests/pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,15 @@ dependencies = [
4141
"boto3>=1.37.2",
4242
]
4343

44-
[tool.pytest.ini_options]
45-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
44+
[tool.pytest]
45+
addopts = [
46+
"-rasl",
47+
"--verbosity=2",
48+
"-p", "no:flaky",
49+
"-p", "no:nose",
50+
"-p", "no:legacypath",
51+
]
52+
4653
norecursedirs = [
4754
".eggs",
4855
]

clients/python/pyproject.toml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,14 @@ include = [
102102
"/airflow_client",
103103
]
104104

105-
[tool.pytest.ini_options]
105+
[tool.pytest]
106106
# make sure that pytest.ini is not read from pyproject.toml in paraent directories
107-
addopts = "--color=yes --cov-config=pyproject.toml --cov=airflow_client"
107+
addopts = [
108+
"--color=yes",
109+
"--cov-config=pyproject.toml",
110+
"--cov=airflow_client",
111+
]
112+
108113
norecursedirs = [
109114
]
110115
log_level = "INFO"

dev/breeze/pyproject.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,15 @@ name = "airflow_breeze"
8989
line-length = 110
9090
target-version = ['py310', 'py311', 'py312']
9191

92-
[tool.pytest.ini_options]
93-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
92+
[tool.pytest]
93+
addopts = [
94+
"-rasl",
95+
"--verbosity=2",
96+
"-p", "no:flaky",
97+
"-p", "no:nose",
98+
"-p", "no:legacypath",
99+
]
100+
94101
norecursedirs = [
95102
".eggs",
96103
]

docker-tests/pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ dependencies = [
3939
"apache-airflow-devel-common",
4040
]
4141

42-
[tool.pytest.ini_options]
43-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
42+
[tool.pytest]
43+
addopts = [
44+
"-rasl",
45+
"--verbosity=2",
46+
"-p", "no:flaky",
47+
"-p", "no:nose",
48+
"-p", "no:legacypath",
49+
]
4450
norecursedirs = [
4551
".eggs",
4652
]

helm-tests/pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ dependencies = [
3939
"apache-airflow-providers-cncf-kubernetes",
4040
]
4141

42-
[tool.pytest.ini_options]
43-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
42+
[tool.pytest]
43+
addopts = [
44+
"-rasl",
45+
"--verbosity=2",
46+
"-p", "no:flaky",
47+
"-p", "no:nose",
48+
"-p", "no:legacypath",
49+
]
4450
norecursedirs = [
4551
".eggs",
4652
]

kubernetes-tests/pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,14 @@ dependencies = [
4343
"requests>=2.32.0,<3",
4444
]
4545

46-
[tool.pytest.ini_options]
47-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
46+
[tool.pytest]
47+
addopts = [
48+
"-rasl",
49+
"--verbosity=2",
50+
"-p", "no:flaky",
51+
"-p", "no:nose",
52+
"-p", "no:legacypath",
53+
]
4854
norecursedirs = [
4955
".eggs",
5056
]

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ mark-parentheses = false
906906
fixture-parentheses = false
907907

908908
## pytest settings ##
909-
[tool.pytest.ini_options]
909+
[tool.pytest]
910910
addopts = [
911911
"--tb=short",
912912
"-rasl",

task-sdk-integration-tests/pyproject.toml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ dependencies = [
4040
"apache-airflow-devel-common",
4141
]
4242

43-
[tool.pytest.ini_options]
44-
addopts = "-rasl --verbosity=2 -p no:flaky -p no:nose -p no:legacypath"
43+
[tool.pytest]
44+
addopts = [
45+
"-rasl",
46+
"--verbosity=2",
47+
"-p", "no:flaky",
48+
"-p", "no:nose",
49+
"-p", "no:legacypath",
50+
]
4551
norecursedirs = [
4652
".eggs",
4753
]

0 commit comments

Comments
 (0)