jscheffl commented on code in PR #57320:
URL: https://github.com/apache/airflow/pull/57320#discussion_r2484548202
##########
airflow-core/tests/unit/cli/commands/test_dag_command.py:
##########
@@ -216,9 +217,8 @@ def test_next_execution(self, tmp_path, stdout_capture):
# Rebuild Test DB for other tests
clear_db_dags()
- parse_and_sync_to_db(os.devnull, include_examples=True)
+ self.setup_class()
Review Comment:
I'd also propose to choose 2.
In my mind making code in a structure for testability is great but adding
balconies for testing in productive code has the danger of future
"mis-use"/"unintended use".
Side effect is that we need this very much often, so in regards of
convenience maybe a dedicated decorator might be nice (but not critical, just
nice) and in regards of performance might be needed to cache examples to
prevent heavy and often re-parse as this will maybe impact performance of
testing if re-parsed often.
--
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]