uranusjr commented on code in PR #41695:
URL: https://github.com/apache/airflow/pull/41695#discussion_r1731015379


##########
tests/models/test_dag.py:
##########
@@ -3720,6 +3720,30 @@ def test__tags_length(tags: list[str], should_pass: 
bool):
             DAG("test-dag", schedule=None, tags=tags)
 
 
[email protected](
+    "input_tags, expected_result",
+    [
+        pytest.param([], set(), id="empty tags"),
+        pytest.param(["a normal tag"], {"a normal tag",}, id="one tag"),
+        pytest.param(["a normal tag", "another normal tag"], {"a normal tag", 
"another normal tag"}, id="two different tags"),
+        pytest.param(["a", "a"], {"a",}, id="two same tags"),
+    ],
+)
+def test__tags_duplicates(input_tags: list[str], expected_result: set[str]):
+    result = DAG("test-dag", tags=input_tags)
+    assert result.tags == expected_result
+
+
+def test__tags_mutable():
+    expected_tags = {"6", "7"}
+    test_dag = DAG("test-dag")
+    test_dag.tags.add("6")
+    test_dag.tags.add("7")
+    test_dag.tags.add("8")
+    test_dag.tags.remove("8")
+    assert test_dag.tags == expected_tags

Review Comment:
   Do we need to support this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to