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

Fix repr tests #2769

Merged
merged 1 commit into from May 11, 2021
Merged

Fix repr tests #2769

merged 1 commit into from May 11, 2021

Conversation

uriyyo
Copy link
Contributor

@uriyyo uriyyo commented May 9, 2021

Fix repr tests

Tests on the master branch are failing after #2593.

Basically, #2502 has changed the repr behavior of the FieldInfo class:

class Model(BaseModel):
    a: int = Field()

field_info = Model.__fileds__['a'].field_info

# before #2502
assert repr(field_info) == 'FieldInfo(default=Ellipsis, extra={})'

# after  #2502
assert repr(field_info) == 'FieldInfo(default=PydanticUndefined, extra={})'

Checklist

  • Unit tests for the changes exist
  • Tests pass on CI and coverage remains at 100%
  • Documentation reflects the changes where applicable
  • changes/<pull request or issue id>-<github username>.md file added describing change
    (see changes/README.md for details)
  • My PR is ready to review, please add a comment including the phrase "please review" to assign reviewers

@uriyyo
Copy link
Contributor Author

uriyyo commented May 9, 2021

please review

@sbv-csis
Copy link
Contributor

LGTM

@samuelcolvin samuelcolvin merged commit 7ac1dc5 into pydantic:master May 11, 2021
@samuelcolvin
Copy link
Member

thanks so much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants