yunhobb commented on code in PR #64297:
URL: https://github.com/apache/airflow/pull/64297#discussion_r3016425169
##########
task-sdk/tests/task_sdk/execution_time/test_task_runner.py:
##########
@@ -2058,6 +2027,42 @@ def mock_get_all_side_effect(task_id, **kwargs):
assert mock_get_one.called
assert not mock_get_all.called
+ @pytest.mark.parametrize(
+ ("task_ids", "default", "expected_value"),
+ [
+ pytest.param("task_a", "fallback", "fallback",
id="single_task_str_default"),
+ pytest.param("task_a", NOTSET, NOTSET,
id="single_task_NOTSET_default"),
+ pytest.param(["task_a"], "fallback", ["fallback"],
id="list_task_str_default"),
+ pytest.param(
+ ["task_a", "task_b"],
+ "fallback",
+ ["fallback", "fallback"],
+ id="multiple_tasks_str_default",
+ ),
+ ],
+ )
+ def test_xcom_pull_default_with_notset_map_indexes(
Review Comment:
@amoghrajesh Thank for feedback!
> 2. XCom.get_all() returns an empty list instead of None?
Do you mean I should add a test case where XCom.get_all() returns [] and
verify that it falls through to `xcoms.extend(values)` without applying the
default?
--
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]