kaxil commented on code in PR #73743:
URL: https://github.com/apache/airflow/pull/73743#discussion_r4161691447


##########
airflow-ctl/tests/airflow_ctl/ctl/test_cli_config.py:
##########
@@ -957,3 +960,27 @@ def 
test_primitive_param_defaulting_to_none_is_still_forwarded(self, monkeypatch
         call_kwargs = self._call_generated_command(monkeypatch, 
DagRunOperations, "list")
 
         assert call_kwargs["state"] is None
+
+    @pytest.mark.parametrize(
+        ("output", "parse", "expected"),
+        [
+            pytest.param("json", json.loads, [{"tags": "etl"}, {"tags": 
"nightly"}], id="json"),
+            pytest.param("yaml", safe_load, [{"tags": "etl"}, {"tags": 
"nightly"}], id="yaml"),
+            pytest.param("table", str.split, ["tags", "=======", "etl", 
"nightly"], id="table"),
+            pytest.param("plain", str.split, ["tags", "etl", "nightly"], 
id="plain"),
+        ],
+    )
+    def test_collection_of_plain_values_prints_one_row_per_value(

Review Comment:
   Could this also pin the two cases the description says keep their output? 
Dropping `top_level and` from the new check in `cli_config.py`, or dropping 
`and not is_data_sequence(value)`, still leaves `tests/airflow_ctl` green. The 
first would turn a `dagrun get` whose `conf` is `{"ids": ["a", "b"]}` into one 
row per id, and the second would wrap every `pools list` row as `{"pools": 
{...}}`. A `pools list -o json` case and a `dagrun get` case with a single-key 
list `conf`, set up with the same `api_client_maker` pattern, would catch both.



-- 
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