You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/17 19:45:55 UTC

[GitHub] [airflow] mik-laj commented on a change in pull request #7419: [AIRFLOW-6804][depends on AIRFLOW-6792] Add the basic test for all example DAGs

mik-laj commented on a change in pull request #7419:  [AIRFLOW-6804][depends on AIRFLOW-6792] Add the basic test for all example DAGs
URL: https://github.com/apache/airflow/pull/7419#discussion_r380344608
 
 

 ##########
 File path: tests/test_example_dags.py
 ##########
 @@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import os
+import unittest
+from glob import glob
+
+from airflow.models import DagBag
+
 
 Review comment:
   We had a long discussion about pytest and parameterized. https://lists.apache.org/thread.html/1e4df7d4b0cd9b2d2bb76a3336471aa85e852545dd41ada6d4e461b8%40%3Cdev.airflow.apache.org%3E
   
   The use of subtest is more nicely displayed in the IDE.
   ![Screenshot 2020-02-17 at 20 38 16](https://user-images.githubusercontent.com/12058428/74682183-a06b1180-51c5-11ea-98e1-7582353450de.png)
   Using parameterized will fake us the number of tests, because suddenly the number of tests will increase by 80. If it's really not a few tests, but only one. I also don't like parameterized when generating a list is expensive. Here it is necessary to walk through a large number of directories to create these tests. 
   
   I don't see the benefit of changing the place where this message is to be displayed. On the other hand, the lack of mock makes this test easier to understand.
   
   
   
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services