This is an automated email from the ASF dual-hosted git repository.
ferruzzi pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new f1ef4ecb374 Enable PT006 rule to kubernetes-tests, performance,
airflow-ctl, docker-tests & shared (#57833)
f1ef4ecb374 is described below
commit f1ef4ecb374a2bd5eb24b2fdefcacb3a31d4c9db
Author: Anusha Kovi <[email protected]>
AuthorDate: Wed Nov 5 12:54:29 2025 -0500
Enable PT006 rule to kubernetes-tests, performance, airflow-ctl,
docker-tests & shared (#57833)
Signed-off-by: Anusha Kovi <[email protected]>
Co-authored-by: Kalyan R <[email protected]>
---
airflow-ctl/tests/airflow_ctl/api/test_client.py | 2 +-
airflow-ctl/tests/airflow_ctl/api/test_operations.py | 2 +-
.../tests/docker_tests/test_examples_of_prod_image_building.py | 2 +-
docker-tests/tests/docker_tests/test_prod_image.py | 2 +-
.../tests/kubernetes_tests/test_kubernetes_pod_operator.py | 4 ++--
performance/tests/test_performance_dag.py | 4 ++--
shared/logging/tests/logging/test_structlog.py | 2 +-
shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py | 2 +-
shared/timezones/tests/timezones/test_timezone.py | 6 +++---
9 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/airflow-ctl/tests/airflow_ctl/api/test_client.py
b/airflow-ctl/tests/airflow_ctl/api/test_client.py
index e2adcadff5e..39ffc436706 100644
--- a/airflow-ctl/tests/airflow_ctl/api/test_client.py
+++ b/airflow-ctl/tests/airflow_ctl/api/test_client.py
@@ -87,7 +87,7 @@ class TestClient:
assert err.value.args == ("Client error message: {'detail': 'Not
found'}",)
@pytest.mark.parametrize(
- "base_url, client_kind, expected_base_url",
+ ("base_url", "client_kind", "expected_base_url"),
[
("http://localhost:8080", ClientKind.CLI,
"http://localhost:8080/api/v2/"),
("http://localhost:8080", ClientKind.AUTH,
"http://localhost:8080/auth/"),
diff --git a/airflow-ctl/tests/airflow_ctl/api/test_operations.py
b/airflow-ctl/tests/airflow_ctl/api/test_operations.py
index 91464e65072..f0a638475c4 100644
--- a/airflow-ctl/tests/airflow_ctl/api/test_operations.py
+++ b/airflow-ctl/tests/airflow_ctl/api/test_operations.py
@@ -128,7 +128,7 @@ class TestBaseOperations:
client.connections.get("1")
@pytest.mark.parametrize(
- "total_entries, limit, expected_response",
+ ("total_entries", "limit", "expected_response"),
[
(1, 50,
(HelloCollectionResponse(hellos=[HelloResponse(name="hello")],
total_entries=1))),
(
diff --git
a/docker-tests/tests/docker_tests/test_examples_of_prod_image_building.py
b/docker-tests/tests/docker_tests/test_examples_of_prod_image_building.py
index ad939ea5f23..438e349eb35 100644
--- a/docker-tests/tests/docker_tests/test_examples_of_prod_image_building.py
+++ b/docker-tests/tests/docker_tests/test_examples_of_prod_image_building.py
@@ -69,7 +69,7 @@ def docker_examples(directory: Path, xfails: dict[str, str] |
None = None):
@pytest.mark.parametrize(
- "dockerfile, relative_path",
+ ("dockerfile", "relative_path"),
docker_examples(DOCKER_EXAMPLES_DIR, xfails=QUARANTINED_DOCKER_EXAMPLES),
)
def test_dockerfile_example(dockerfile, relative_path, tmp_path):
diff --git a/docker-tests/tests/docker_tests/test_prod_image.py
b/docker-tests/tests/docker_tests/test_prod_image.py
index 69777c426ae..0a8e604b74a 100644
--- a/docker-tests/tests/docker_tests/test_prod_image.py
+++ b/docker-tests/tests/docker_tests/test_prod_image.py
@@ -197,7 +197,7 @@ class TestPythonPackages:
}
@pytest.mark.parametrize(
- "package_name,import_names",
+ ("package_name", "import_names"),
SLIM_PACKAGE_IMPORTS.items() if testing_slim_image else
REGULAR_PACKAGE_IMPORTS.items(),
)
def test_check_dependencies_imports(
diff --git
a/kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py
b/kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py
index 77d44ed5a67..fdad5f18fbf 100644
--- a/kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py
+++ b/kubernetes-tests/tests/kubernetes_tests/test_kubernetes_pod_operator.py
@@ -1434,7 +1434,7 @@ class TestKubernetesPodOperatorSystem:
)
@pytest.mark.parametrize(
- "log_prefix_enabled, log_formatter, expected_log_message_check",
+ ("log_prefix_enabled", "log_formatter", "expected_log_message_check"),
[
pytest.param(
True,
@@ -1536,7 +1536,7 @@ class TestKubernetesPodOperator(BaseK8STest):
create_connection_without_db(connection)
@pytest.mark.parametrize(
- "active_deadline_seconds,should_fail",
+ ("active_deadline_seconds", "should_fail"),
[(3, True), (60, False)],
ids=["should_fail", "should_not_fail"],
)
diff --git a/performance/tests/test_performance_dag.py
b/performance/tests/test_performance_dag.py
index dcabcb2351e..568e9acb5ef 100644
--- a/performance/tests/test_performance_dag.py
+++ b/performance/tests/test_performance_dag.py
@@ -124,14 +124,14 @@ def get_import_errors():
return [(None, None)] + [(strip_path_prefix(k), v.strip()) for k, v in
dag_bag.import_errors.items()]
[email protected]("rel_path,rv", get_import_errors(), ids=[x[0] for x
in get_import_errors()])
[email protected](("rel_path", "rv"), get_import_errors(), ids=[x[0]
for x in get_import_errors()])
def test_file_imports(rel_path, rv):
"""Test for import errors on a file."""
if rel_path and rv:
pytest.fail(f"{rel_path} failed to import with message \n {rv}")
[email protected]("dag_count,task_count", [(1, 1), (1, 10), (10, 10),
(10, 100)])
[email protected](("dag_count", "task_count"), [(1, 1), (1, 10), (10,
10), (10, 100)])
def test_performance_dag(dag_count, task_count):
dags = get_dags(dag_count=dag_count, task_count=task_count)
assert len(dags) == dag_count
diff --git a/shared/logging/tests/logging/test_structlog.py
b/shared/logging/tests/logging/test_structlog.py
index 635f91e2157..4328b167d34 100644
--- a/shared/logging/tests/logging/test_structlog.py
+++ b/shared/logging/tests/logging/test_structlog.py
@@ -342,7 +342,7 @@ def test_json_exc(structlog_config, get_logger,
monkeypatch):
@pytest.mark.parametrize(
- ("levels",),
+ "levels",
(
pytest.param("my.logger=warn", id="str"),
pytest.param({"my.logger": "warn"}, id="dict"),
diff --git a/shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py
b/shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py
index 454ee7e3db6..55c15a858d9 100644
--- a/shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py
+++ b/shared/secrets_masker/tests/secrets_masker/test_secrets_masker.py
@@ -370,7 +370,7 @@ class TestSecretsMasker:
assert caplog.messages == ["redacted: ***"]
@pytest.mark.parametrize(
- "state, expected",
+ ("state", "expected"),
[
(MyEnum.testname, "testvalue"),
],
diff --git a/shared/timezones/tests/timezones/test_timezone.py
b/shared/timezones/tests/timezones/test_timezone.py
index 34f3c1537d7..d1face7263e 100644
--- a/shared/timezones/tests/timezones/test_timezone.py
+++ b/shared/timezones/tests/timezones/test_timezone.py
@@ -93,7 +93,7 @@ class TestTimezone:
@pytest.mark.parametrize(
- "input_datetime, output_datetime",
+ ("input_datetime", "output_datetime"),
[
pytest.param(None, None, id="None datetime"),
pytest.param(
@@ -145,7 +145,7 @@ def test_parse_timezone_utc(tz_name):
@pytest.mark.parametrize(
- "tz_offset, expected_offset, expected_name",
+ ("tz_offset", "expected_offset", "expected_name"),
[
pytest.param(0, 0, "+00:00", id="zero-offset"),
pytest.param(-3600, -3600, "-01:00", id="1-hour-behind"),
@@ -183,7 +183,7 @@ def test_from_timestamp_local(tz):
@pytest.mark.parametrize(
- "tz, iana_timezone",
+ ("tz", "iana_timezone"),
[
pytest.param(Timezone("Europe/Paris"), "Europe/Paris",
id="pendulum-timezone"),
pytest.param("America/New_York", "America/New_York",
id="IANA-timezone"),