Merged
Conversation
covering SQL parsing, though there is some non-SQL as well. Added tests for * extract_from_part() * extract_table_identifiers() * find_prev_keyword() * get_last_select() * is_subselect() * is_valid_connection_scheme() * last_word() * query_is_single_table_update() Also: * adding the tests inspired catching a possible IndexError in query_is_single_table_update(). * removed an unused __main__ section from parseutils.py * accidentally changed some quoting in the tests * test_extract_columns_from_select() seemed to incorrectly catch an exception, which was removed. If tests can raise, that is something that should itself be tested, not covered up.
|
Findings
No correctness/security regressions stood out in the diff beyond that testing gap. Could not run tests in this environment because |
scottnemes
approved these changes
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Add more tests for
parseutils.py, covering SQL parsing, though there is some non-SQL as well. Added tests forextract_from_part()extract_table_identifiers()find_prev_keyword()get_last_select()is_subselect()is_valid_connection_scheme()last_word()query_is_single_table_update()Also:
IndexErrorinquery_is_single_table_update().__main__section fromparseutils.pytest_extract_columns_from_select()seemed to incorrectly catch an exception, which was removed. If tests can raise, that is something that should itself be tested, not covered up.I couldn't figure out how to test the punctuation parameter to
extract_from_part()and left a todo comment.This is covered by an existing changelog entry.
Checklist
changelog.mdfile.AUTHORSfile (or it's already there).