uranusjr commented on a change in pull request #19194:
URL: https://github.com/apache/airflow/pull/19194#discussion_r735735239
##########
File path: tests/models/test_taskinstance.py
##########
@@ -537,10 +525,10 @@ def reschedule():
session.commit()
ti.task = task
- if state in [State.FAILED, State.UP_FOR_RETRY]:
+ if func.__name__ == "_failure":
Review comment:
Another possibility would be to add yet another parameter:
```python
def run_expect_catch(ti):
with pytest.raises(AirflowException):
ti.run()
def run(ti):
ti.run()
@pytest.mark.parametrize(
"..., run_func",
[
(..., failure, run_expect_catch),
(..., success, run),
...,
],
)
```
--
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]