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

Fixed error message prints function decorators when using assert in Python 3.9 and above. #9359

Merged
merged 3 commits into from Dec 7, 2021

Conversation

yuvalshi0
Copy link
Member

Closes #9355

Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks @yuvalshi0, excellent investigation and PR. I only have a suggestion to add a comment, but it looks good to me!

src/_pytest/_code/source.py Show resolved Hide resolved
@bluetech bluetech merged commit dc70915 into pytest-dev:main Dec 7, 2021
@nicoddemus
Copy link
Member

Does this need to be backported to 7.0.x?

@bluetech
Copy link
Member

bluetech commented Dec 7, 2021

Yes, I'll backport it later if no one beats me to it.

@bluetech bluetech added the needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch label Dec 7, 2021
nicoddemus pushed a commit to nicoddemus/pytest that referenced this pull request Dec 7, 2021
@nicoddemus
Copy link
Member

No worries, done it in #9381. 👍

@nicoddemus nicoddemus added backported PR has been backported to the current bug-fix branch and removed needs backport applied to PRs, indicates that it should be ported to the current bug-fix branch labels Dec 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported PR has been backported to the current bug-fix branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error message prints extra code line when using assert in python3.9
3 participants