stevenschaerer opened a new pull request, #37680: URL: https://github.com/apache/airflow/pull/37680
related: #35127 This PR improves the test coverage of the trigger_rule_dep.py module and increases code coverage from 91% to 99%. It also removes an unreachable code fragment (`upstream_setup` used to be of type `int | None`, but now only `int`) and adds some missing whitespaces to one of the failure reasons. I believe that the 3 lines that are still not covered (184, 208, 214) can't be reached without nested mapped tasks which are currently not supported. While the pure code coverage could have been improved by only adding a couple of tests, `test_trigger_rule_dep.py` actually only covered 85% of trigger_rule_dep.py, with the additional misses mainly coming from the `flag_upstream_failed == True` branch. There was also a chance of tests accidentally succeeding since the failure reason was often not validated (this happened in `test_always_tr`). For these reasons I opted to extend many of the existing tests. Generally this meant testing `flag_upstream_failed` being true and false as well as validating the resulting ti state. -- 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]
