turbaszek commented on a change in pull request #11209:
URL: https://github.com/apache/airflow/pull/11209#discussion_r499240594
##########
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 think the previous name was more informative
----------------------------------------------------------------
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]