-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Replace unittests in providers-apache tests by pure pytest
#27948
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TestDrillOperator has a bit strange decorator might be some typo or outdated stuff:
- Backend
drillnot exists - Integration
drillnot exists but might be exists in the past
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed. I think drill has been missing in action :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part previously exists in tests case methods.
Is a good idea get rid of this logger entirely?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. We can get rid of it as a follow-up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as mention for TestHdfsSensorFolder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here. This seems to be a left-over and we should get rid of it as a follow-up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This class only use once in the same module and also have the same name as reusable test class from tests/providers/apache/hive/__init__.py which may confuse
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep.
2e6b09e to
7630d4d
Compare
|
Yeah. I really like the pytest conversions :) |
Migrate all Apache providers tests to
pytest.All changes are more or less straightforward:
unittests.TestCaseclass and TestCase.assert* methodsparameterized.expandbypytest.mark.parametrize. Irequests_mock.mockdecorator byrequests_mockfixtureTestCase.subTestto parametrize testsSee additional findings in comments