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/10/04 12:29:06 UTC

[GitHub] [airflow] eladkal commented on a change in pull request #11209: Change prefix of Aws dynamodb hook file

eladkal commented on a change in pull request #11209:
URL: https://github.com/apache/airflow/pull/11209#discussion_r499241436



##########
File path: tests/test_project_structure.py
##########
@@ -56,18 +56,23 @@ def test_providers_modules_should_have_tests(self):
         """
         Assert every module in /airflow/providers has a corresponding test_ file in tests/airflow/providers.
         """
+        # Deprecated modules that don't have corresponded test
+        expected_missing_providers_modules = {('airflow/providers/amazon/aws/hooks/aws_dynamodb.py',
+                                               'tests/providers/amazon/aws/hooks/test_aws_dynamodb.py')}
+
         # TODO: Should we extend this test to cover other directories?
-        expected_test_files = glob.glob(f"{ROOT_FOLDER}/airflow/providers/**/*.py", recursive=True)
+        modules_files = glob.glob(f"{ROOT_FOLDER}/airflow/providers/**/*.py", recursive=True)
+
         # Make path relative
-        expected_test_files = (os.path.relpath(f, ROOT_FOLDER) for f in expected_test_files)
+        modules_files = (os.path.relpath(f, ROOT_FOLDER) for f in modules_files)
         # Exclude example_dags
-        expected_test_files = (f for f in expected_test_files if "/example_dags/" not in f)
+        modules_files = (f for f in modules_files if "/example_dags/" not in f)
         # Exclude __init__.py
-        expected_test_files = (f for f in expected_test_files if not f.endswith("__init__.py"))
+        modules_files = (f for f in modules_files if not f.endswith("__init__.py"))

Review comment:
       I changed the name to `modules_files` because at this point these are not yet the files in the `test/` path.
   the `modules_files` are needed for the 2nd new subtest. Thus we need to distinguish between the test modules to the actual modules. WDYT?




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