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

Error loading entry points are silently swallowed #1307

Closed
wichert opened this issue Jan 4, 2016 · 3 comments
Closed

Error loading entry points are silently swallowed #1307

wichert opened this issue Jan 4, 2016 · 3 comments
Labels
status: critical grave problem or usability issue that affects lots of users type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog type: bug problem that needs to be addressed

Comments

@wichert
Copy link

wichert commented Jan 4, 2016

I just had my tests fail due to an unrecognised pytest parameter. This had me puzzled for quite some time: the parameter was defined by fixtures in another package and should work fine. Looking at py.test -fixtures output shows that there were a lot of missing fixtures. I eventually traced that down to an import error in one of my fixture entry points. As far as I can see the pytest behaviour for fixture discovery works like this:

  1. get a list of `pytest11`` entry points
  2. try to load the first entry point. This failed with an ImportError. The error is not shown, but silently discarded. There is a self.warn statement, but that is not shown normally.
  3. IF a single entry point import fails abort loading any more entry points.

This behaviour is not very friendly: fixture errors are silently ignored, and errors in one fixture will prevent other fixtures from being loaded.

@The-Compiler
Copy link
Member

Hm, I'm sure I stumbled upon the same issue myself some while ago, but I can't find a report.

@RonnyPfannschmidt RonnyPfannschmidt added type: bug problem that needs to be addressed type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog status: critical grave problem or usability issue that affects lots of users labels Jan 4, 2016
@The-Compiler
Copy link
Member

Closing this in favour of #1479 - my bad for opening a duplicate, but there's some initial debugging there, so I think it makes more sense to close this one.

@The-Compiler
Copy link
Member

Proposed fix in #1564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: critical grave problem or usability issue that affects lots of users type: backward compatibility might present some backward compatibility issues which should be carefully noted in the changelog type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

3 participants