dstandish commented on a change in pull request #5422: [AIRFLOW-4798] obviate 
interdependencies for dagbag and TI tests 
URL: https://github.com/apache/airflow/pull/5422#discussion_r294093739
 
 

 ##########
 File path: tests/models/test_dagbag.py
 ##########
 @@ -194,13 +194,14 @@ def test_get_dag_fileloc(self):
         Test that fileloc is correctly set when we load example DAGs,
         specifically SubDAGs and packaged DAGs.
         """
-        dagbag = models.DagBag(include_examples=True)
+        dagbag = models.DagBag(dag_folder=self.empty_dir, 
include_examples=True)
 
 Review comment:
   Thanks for taking a look.
   
   The convention in this file seems to be to create the dagbag in each test 
method.  
   
   I think this is reasonable because in different tests methods, DagBag will 
be instantiated in different ways; some include examples (or not), some say 
safe mode (or not), some reference a dag_folder (or not).  And the cost of 
repeating it is very low -- around 1 line.  And the benefit of repeating it is 
you can see, in each test method, exactly what it is doing.  
   
   What do you think?
   
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to