ashb commented on code in PR #46728:
URL: https://github.com/apache/airflow/pull/46728#discussion_r1975369511
##########
task_sdk/tests/execution_time/test_task_runner.py:
##########
@@ -1075,44 +1076,86 @@ def test_get_variable_from_context(
assert var_from_context == Variable(key="test_key",
value=expected_value)
+ @pytest.mark.parametrize(
+ "map_indexes",
+ [
+ pytest.param(-1, id="no_map_index"),
+ pytest.param(1, id="single_map_index"),
+ pytest.param(42, id="not_set_with_index"),
+ pytest.param([0, 1], id="multiple_map_indexes"),
+ pytest.param((0, 1), id="any_iterable"),
+ pytest.param(None, id="map_indexes_none"),
+ pytest.param(-9999, id="not_set_no_index"),
+ ],
Review Comment:
Oh it does, but there are two ways of doing it (42 and -9999) and it's not
very clear from looking at the params alone that this is the behaviour.
Lets not have two ways, and instead of using a maigc int to do it, have one
of the param values as NOTSET here (still keeping the `map_indexes_kwarg = {}`
behaviour you have)
--
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]