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` these are not the expected test 
files.
   At this point these are only the current module files. the `modules_files` 
are needed for the 2nd new subtest.
   Later in the code we create the expected test files from the modules that we 
found and search for matching with the actual test files under `/test`.
   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:
[email protected]


Reply via email to