Skip to content

add longrepr from plugin tests - #50

Merged
utgwkk merged 2 commits into
pytest-dev:mainfrom
helpmefindaname:main
Jul 2, 2022
Merged

add longrepr from plugin tests#50
utgwkk merged 2 commits into
pytest-dev:mainfrom
helpmefindaname:main

Conversation

@helpmefindaname

Copy link
Copy Markdown
Contributor

According to the pytest reference report.longrepr can be either a an object holding a reprcrash, a tuple containing filename linenumber and message in the respective order or a plain string containing a raw message.

The latter is the way plugins like pytest-flake8 or pytest-mypy Create their error messages. I propose adding the full context there, as only the report.head_line or item.name can lead to rather confusing outcomes

I guess it would be even nicer to create multiple annotations per error, but then this plugin's code base would be too dependent on certain other plugins. Having the errors listed at the start of the file should be enough.

@utgwkk

utgwkk commented Jul 2, 2022

Copy link
Copy Markdown
Member

@helpmefindaname I fixed CI in #51. Could you update this branch?

@helpmefindaname

Copy link
Copy Markdown
Contributor Author

Thanks for the fast response, I have updated the branch now

@utgwkk
utgwkk merged commit d8b44a0 into pytest-dev:main Jul 2, 2022
@utgwkk

utgwkk commented Jul 2, 2022

Copy link
Copy Markdown
Member

I have just published version 0.1.7 including this patch. Thank you for your contribution! @helpmefindaname

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