Dev-iL commented on code in PR #59785:
URL: https://github.com/apache/airflow/pull/59785#discussion_r2649064336


##########
airflow-core/tests/unit/cli/commands/test_dag_command.py:
##########
@@ -225,7 +225,7 @@ def test_cli_report(self, stdout_capture):
             dag_command.dag_report(args)
             out = temp_stdout.getvalue()
 
-        assert "airflow/example_dags/example_complex.py" in out

Review Comment:
   That's fair.
   
   Option 3 is 98% better than the original in my eyes:
   - +98% because I couldn't immediately tell that the original would break 
after the change to the business logic - and not only would the json version 
not break similarly, it makes it very explicit and specific what is being 
tested, and it reduces the chance of the test "xpassing".
   - -2% because the test will be more implementation specific (it assumes 
json), so it'll need to be modified if we ever move to another format (this is 
the main counterargument for option 2, btw).
   
   Option 1 is "alright", but it doesn't express the "spec intent" as well - I 
completely agree with that.
   
   I'm happy to change it to option 3.



-- 
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]

Reply via email to