-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Verify data in tests (row count and first row) #215
Conversation
|
||
with engine.connect() as connection: |
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.
I like that you want to consolidate the Tests but I think this test had a pretty solid data test and you removed a lot of the checks that were there before. We could just leave this one alone, or you could expand your verify data function to be able to work with multiple rows of data.
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.
Expanded to work with multiple rows.
) | ||
assert result.rowcount == number_of_rows | ||
result_dict = remove_metadata_columns(result.first()._asdict()) | ||
assert result_dict == check_data |
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.
I'm impressed with Python's dictionary comparisons!
Implement a method to verify data in tests. Currently only checks the total number of rows in a table and the data in the first row. I believe this provides good test coverage while keeping things manageable.
Closes #16