ferruzzi commented on code in PR #55706:
URL: https://github.com/apache/airflow/pull/55706#discussion_r2353880552
##########
task-sdk/tests/task_sdk/bases/test_operator.py:
##########
@@ -489,16 +493,22 @@ def test_chain_different_length_iterable(self):
for i in range(1, 6)
]
- with pytest.raises(ValueError):
+ with pytest.raises(
+ ValueError, match="Chain not supported for different length
Iterable. Got 2 and 3."
+ ):
Review Comment:
Feel free to ignore this and resolve the comment, but maybe consider
replacing the repetitive strings with a single templated string and using
string.format something like this:
```
CHAIN_NOT_SUPPORTED = "Chain not supported for different length Iterable.
Got %s and %s."
```
```
with pytest.raises(ValueError, match=CHAIN_NOT_SUPPORTED.format(2, 3)):
```
or
```
with pytest.raisesValueError, match=CHAIN_NOT_SUPPORTED.format(3, 2)):
```
--
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]