Skip to content

Conversation

@asottile
Copy link
Member

@asottile asottile commented Apr 8, 2022

resolves #9820

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

fields_to_check = [field for field, info in all_fields.items() if info.compare]
import dataclasses

all_fields = dataclasses.fields(left)
Copy link
Member

Choose a reason for hiding this comment

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

👍

@nicoddemus nicoddemus added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Apr 8, 2022
@asottile asottile merged commit f0cf63a into pytest-dev:main Apr 9, 2022
@asottile asottile deleted the init-var-only-dataclasses branch April 9, 2022 00:08
@asottile asottile added backport 7.1.x and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Apr 9, 2022
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.

Assertion diffs print-outs break on dataclasses with InitVar fields

2 participants