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 08ed3ee741e Enable PT006 rule to airflow-core tests (utils) (#57886)
08ed3ee741e is described below
commit 08ed3ee741e7c73f45cad2052a78b3dd7439ecf2
Author: Xch1 <[email protected]>
AuthorDate: Thu Nov 6 13:24:46 2025 +0800
Enable PT006 rule to airflow-core tests (utils) (#57886)
Co-authored-by: Kalyan R <[email protected]>
Signed-off-by: Xch1 <[email protected]>
---
airflow-core/tests/unit/utils/test_file.py | 2 +-
airflow-core/tests/unit/utils/test_helpers.py | 4 ++--
airflow-core/tests/unit/utils/test_log_handlers.py | 10 +++++-----
airflow-core/tests/unit/utils/test_logging_mixin.py | 2 +-
airflow-core/tests/unit/utils/test_operator_helpers.py | 4 ++--
airflow-core/tests/unit/utils/test_strings.py | 2 +-
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/airflow-core/tests/unit/utils/test_file.py
b/airflow-core/tests/unit/utils/test_file.py
index ca6c7e534b9..bfdff826754 100644
--- a/airflow-core/tests/unit/utils/test_file.py
+++ b/airflow-core/tests/unit/utils/test_file.py
@@ -262,7 +262,7 @@ class TestListPyFilesPath:
@pytest.mark.parametrize(
- "edge_filename, expected_modification",
+ ("edge_filename", "expected_modification"),
[
("test_dag.py", "unusual_prefix_mocked_path_hash_sha1_test_dag"),
("test-dag.py", "unusual_prefix_mocked_path_hash_sha1_test_dag"),
diff --git a/airflow-core/tests/unit/utils/test_helpers.py
b/airflow-core/tests/unit/utils/test_helpers.py
index 113f90c68ee..6f297904eb7 100644
--- a/airflow-core/tests/unit/utils/test_helpers.py
+++ b/airflow-core/tests/unit/utils/test_helpers.py
@@ -138,7 +138,7 @@ class TestHelpers:
assert build_airflow_dagrun_url(dag_id="somedag", run_id="abc123") ==
expected_url
@pytest.mark.parametrize(
- "key_id, message, exception",
+ ("key_id", "message", "exception"),
[
(3, "The key has to be a string and is <class 'int'>:3",
TypeError),
(None, "The key has to be a string and is <class
'NoneType'>:None", TypeError),
@@ -222,7 +222,7 @@ class TestHelpers:
assert_at_most_one(*row)
@pytest.mark.parametrize(
- "mode, expected",
+ ("mode", "expected"),
[
(
"strict",
diff --git a/airflow-core/tests/unit/utils/test_log_handlers.py
b/airflow-core/tests/unit/utils/test_log_handlers.py
index 97d5c2c50e5..30669ab0599 100644
--- a/airflow-core/tests/unit/utils/test_log_handlers.py
+++ b/airflow-core/tests/unit/utils/test_log_handlers.py
@@ -493,7 +493,7 @@ class TestFileTaskLogHandler:
assert list(log_streams[1]) == ["file2 content", "file2 content2"]
@pytest.mark.parametrize(
- "remote_logs, local_logs, served_logs_checked",
+ ("remote_logs", "local_logs", "served_logs_checked"),
[
(True, True, False),
(True, False, False),
@@ -857,7 +857,7 @@
AIRFLOW_CTX_DAG_RUN_ID=manual__2022-11-16T08:05:52.324532+00:00
@pytest.mark.parametrize(
- "chunk_size, expected_read_calls",
+ ("chunk_size", "expected_read_calls"),
[
(10, 4),
(20, 3),
@@ -999,7 +999,7 @@ def test__create_sort_key():
@pytest.mark.parametrize(
- "timestamp, line_num, expected",
+ ("timestamp", "line_num", "expected"),
[
pytest.param(
pendulum.parse("2022-11-16T00:05:54.278000-08:00"),
@@ -1026,7 +1026,7 @@ def test__is_sort_key_with_default_timestamp(timestamp,
line_num, expected):
@pytest.mark.parametrize(
- "log_stream, expected",
+ ("log_stream", "expected"),
[
pytest.param(
convert_list_to_stream(
@@ -1128,7 +1128,7 @@ def test__add_log_from_parsed_log_streams_to_heap():
@pytest.mark.parametrize(
- "heap_setup, flush_size, last_log, expected_events",
+ ("heap_setup", "flush_size", "last_log", "expected_events"),
[
pytest.param(
[("msg1", "2023-01-01"), ("msg2", "2023-01-02")],
diff --git a/airflow-core/tests/unit/utils/test_logging_mixin.py
b/airflow-core/tests/unit/utils/test_logging_mixin.py
index 4ad65db7fb1..37e83fdf039 100644
--- a/airflow-core/tests/unit/utils/test_logging_mixin.py
+++ b/airflow-core/tests/unit/utils/test_logging_mixin.py
@@ -175,7 +175,7 @@ class TestStreamLogWriter:
assert isinstance(log.name, str)
[email protected](["maintain_propagate"],
[[SetContextPropagate.MAINTAIN_PROPAGATE], [None]])
[email protected]("maintain_propagate",
[SetContextPropagate.MAINTAIN_PROPAGATE, None])
def test_set_context_propagation(parent_child_handlers, child_logger,
maintain_propagate):
# Test the behaviour of set_context and logger propagation and the
MAINTAIN_PROPAGATE return
diff --git a/airflow-core/tests/unit/utils/test_operator_helpers.py
b/airflow-core/tests/unit/utils/test_operator_helpers.py
index 78de84c600e..b197946c3ff 100644
--- a/airflow-core/tests/unit/utils/test_operator_helpers.py
+++ b/airflow-core/tests/unit/utils/test_operator_helpers.py
@@ -100,7 +100,7 @@ KWARGS = {
@pytest.mark.parametrize(
- "func,args,kwargs,expected",
+ ("func", "args", "kwargs", "expected"),
[
(callable1, (), KWARGS, ("20200101",)),
(
@@ -136,7 +136,7 @@ def test_make_kwargs_callable_conflict():
@pytest.mark.parametrize(
- "func,args,kwargs,expected",
+ ("func", "args", "kwargs", "expected"),
[
(callable10, (1, 2), {"ds_nodash": 1}, {"ds_nodash": 1}),
(callable11, (1, 2), {"ds_nodash": 1}, {"ds_nodash": 1}),
diff --git a/airflow-core/tests/unit/utils/test_strings.py
b/airflow-core/tests/unit/utils/test_strings.py
index e49af710b9f..c18e5b3f7cd 100644
--- a/airflow-core/tests/unit/utils/test_strings.py
+++ b/airflow-core/tests/unit/utils/test_strings.py
@@ -23,7 +23,7 @@ from airflow.utils.strings import to_boolean
@pytest.mark.parametrize(
- "input_string, expected_result",
+ ("input_string", "expected_result"),
[
(" yes ", True),
(" 1\n", True),