jscheffl commented on code in PR #57320:
URL: https://github.com/apache/airflow/pull/57320#discussion_r2484559274
##########
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:
Reading more context of the change I assume this is a bit of a
mis-conception how the previous code was constructured. Calling the
"setup_class()" or a re-sync of dags is conceptually wrong. Not for your change
but in general. If the test "messes up" the dags and side effects should be
prevented then a proper fixture is needed and it should not be made in a way
that the initialization is called again... hard to get the context and error
prone as missing might make other test cases broken...
Not sure, might not be fixed here but would be a good issue in another PR to
improve.
--
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]