Skip to content
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

Adding prints that show the field names being compared #24

Merged
merged 2 commits into from
May 30, 2024

Conversation

chrisguidry
Copy link
Contributor

Because we loop over field names within tests, rather than as pytest fixtures,
we don't know which field may have caused a failure. These prints will help
for triaging compatibility issues.

Because we loop over field names _within_ tests, rather than as pytest fixtures,
we don't know which field may have caused a failure.  These `print`s will help
for triaging compatibility issues.
Copy link

@serinamarie serinamarie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@@ -382,6 +386,10 @@ def preprocess_pydantic_v1_type(schema):
]

for field_name, props in items:
# Note, this print is here intentionally to make it easier to understand
# test failures when looping over fields
print(field_name)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Does it make sense to print that this is a field name as well or would that already be apparent?

e.g. print(f"field name: {field_name}")

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can do that!

@chrisguidry chrisguidry merged commit c5672ab into main May 30, 2024
1 check passed
@chrisguidry chrisguidry deleted the show-field-name branch May 30, 2024 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants