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
[MAINTENANCE] SQL backend integration tests #9822
[MAINTENANCE] SQL backend integration tests #9822
Conversation
✅ Deploy Preview for niobium-lead-7998 canceled.
|
num_expected_batch_definitions=299, | ||
num_expected_rows_in_first_batch_definition=2, | ||
expected_column_values=self.taxi_test_data.year_month_day_batch_identifier_data(), | ||
), | ||
TaxiPartitioningTestCase( |
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.
We aren't supporting these yet in 1.0
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9822 +/- ##
===========================================
- Coverage 82.54% 82.52% -0.03%
===========================================
Files 504 504
Lines 45097 45097
===========================================
- Hits 37227 37215 -12
- Misses 7870 7882 +12
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks for doing this. This seems like the way to leverage the established test pattern.
@@ -965,6 +967,26 @@ def get_connection_string_and_dialect( | |||
return dialect, connection_string | |||
|
|||
|
|||
def add_datasource( |
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.
Attention reviewer! I don't like this, but I think it's the best we can do without restructuring tests more or passing method names as strings 🤮 . Open to suggestions if there's something better we can do!
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.
LGTM, thanks!
) -> SQLDatasource: | ||
"""Add a datasource to the context based on the dialect from config file. | ||
|
||
Needed because context.data_sources.add_sql is prohibitted when |
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.
Needed because context.data_sources.add_sql is prohibitted when | |
Needed because context.data_sources.add_sql is prohibited when |
Approach
This leans on the setup of existing docs tests, so it uses the test script runner. There's a bit of grossness around passing in the names of methods that end up getting called, but I don't think a larger refactor of this is worth it at the moment.
invoke lint
(usesruff format
+ruff check
)For more information about contributing, see Contribute.
After you submit your PR, keep the page open and monitor the statuses of the various checks made by our continuous integration process at the bottom of the page. Please fix any issues that come up and reach out on Slack if you need help. Thanks for contributing!