-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Show full qualified name on direct Node construction warning #8994
Comments
Hi! I would like to work in this issue :) |
@eamanu thanks for volunteering! Please go ahead and let us know if you encounter any problems. 👍 |
Hi can I work on this as well ? |
Hi, @wassafshahzad sure!! I looked into the pytest code to identify where that message is write. That is here [0], I spend several time trying to found where the name is "loaded" into a class that use the NodeMeta. But I cannot found nothing yet. So, I'm trying to access to the Node class [1] variables from NodeMeta, and I guess that we'll need to use [0] Line 122 in 6247a95
[1] Line 146 in 6247a95
|
Classes have a >>> from _pytest.nodes import File
>>> File.__module__
'_pytest.nodes' So unless I'm missing something it is just a matter of changing: Line 126 in 6247a95
To: ).format(name=f"{self.__module__}.{self.__name__}") |
so should we create a PR with this change ? |
Yes pretty much. 😁 Make sure to add/update an existing test for the new behavior too. |
I'm just create the PR, thanks @nicoddemus for the advice, was simpler that I imagine :) |
This is an impovement for a warning introduced in this release, so including it in a changelog against the last release seems confusing.
* Remove changelog entry for #8251 Reverted in #8903 * Move #9202 changelog to to trivial This won't concern users of pytest * Streamline deprecation changelogs/docs * Remove #8994 changelog This is an impovement for a warning introduced in this release, so including it in a changelog against the last release seems confusing. * Remove #9241 changelog This is an impovement for a doc update introduced in this release, so including it in a changelog against the last release seems confusing. The issue number also seems about something different. * Remove #8897 changelog Empty file... * Various minor changelog fixes
In ESSS/pytest-regressions#64, running pytest with many plugins installed gives this error:
And is not clear which plugin is the culprit, I had to look at the source code of
pytest-relaxed
to figure it out.We might consider at least show the full qualified name of the offending class in that message, so users would see
pytest_relaxed.plugin.SpecModule
, which is a nudge in the right direction.Originally posted by @nicoddemus in #8993 (comment)
The text was updated successfully, but these errors were encountered: