uranusjr commented on code in PR #64133:
URL: https://github.com/apache/airflow/pull/64133#discussion_r3019767500
##########
airflow-core/tests/unit/cli/commands/test_task_command.py:
##########
@@ -305,6 +305,68 @@ def test_mapped_task_render(self):
assert "[3]" not in output
assert "property: op_args" in output
+ @pytest.mark.usefixtures("testing_dag_bundle")
+ def test_mapped_task_render_out_of_range_map_index(self):
+ """Raise ValueError when map_index exceeds the parse-time mapped
count."""
+ with pytest.raises(ValueError, match=r"map_index 5 is out of range.*3
mapped instance"):
Review Comment:
Is it posible to validate the entire message instead of using regex
matching? It’s possible with
```python
with pytest.raises(...) as r:
...
assert r.value.args == ("...",)
```
--
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]