-
Notifications
You must be signed in to change notification settings - Fork 97
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
Mark Tests That Generate SQL-Engine-Specific Snapshots #828
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.
🚀
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.
@plypaul hah, I was way too lazy to make all those mark test changes. 😁
@@ -136,6 +136,7 @@ def convert_and_check( | |||
) | |||
|
|||
|
|||
@pytest.mark.sql_engine_snapshot |
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.
You can mark the file, actually, but this seems fine to me.
@@ -261,6 +261,9 @@ def assert_object_snapshot_equal( # type: ignore[misc] | |||
sql_client: Optional[SqlClient] = None, | |||
) -> None: | |||
"""For tests to compare large objects, this can be used to snapshot a text representation of the object.""" | |||
if sql_client is not None: | |||
check_sql_engine_snapshot_marker(request) |
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.
YES!
Description
This PR adds a custom pytest marker to mark tests that generate SQL-engine-specific snapshots. This helps to ensures that the
generate_snapshots.py
script generates snapshots for all relevant tests.