BasPH commented on a change in pull request #7346: [AIRFLOW-6720] Detect
missing tests for providers package
URL: https://github.com/apache/airflow/pull/7346#discussion_r373957459
##########
File path: tests/test_project_structure.py
##########
@@ -35,3 +70,50 @@ def assert_file_not_contains(self, filename, pattern):
with open(filename, 'rb', 0) as file, mmap.mmap(file.fileno(), 0,
access=mmap.ACCESS_READ) as content:
if content.find(bytes(pattern, 'utf-8')) != -1:
self.fail(f"File {filename} contians illegal pattern -
{pattern}")
+
+ def test_providers_modules_should_have_tests(self):
Review comment:
Nice, looks good to me. Even though the code is well commented, perhaps add
an explanatory docstring e.g.?
```suggestion
def test_providers_modules_should_have_tests(self):
"""Assert every module in /airflow/providers has a corresponding
test_ file in tests/airflow/providers."""
```
----------------------------------------------------------------
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