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

tests: pytest doesn't fail for unhandled exceptions in signal handlers #2705

Closed
lazka opened this Issue Jan 9, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@lazka
Member

lazka commented Jan 9, 2018

@lazka lazka added the enhancement label Jan 9, 2018

lazka added a commit that referenced this issue Jan 9, 2018

information: another filter() py3 porting bug. Fixes #2704
The test doesn't actually work due to #2705

lazka added a commit to lazka/quodlibet that referenced this issue Jan 9, 2018

tests: capture exceptions that are not caught during the test executi…
…on an reraise them. Fixes quodlibet#2705

Exceptions raised during signals don't bubble to the test caller, instead they
get pushed into sys.excepthook which by default prints them.

This adds a pytest plugin which wraps each test (I think..) collects uncaught exceptions
and reraises them at the end.

This uncovers a few bugs, so this makes the tests fail atm.
@lazka

This comment has been minimized.

Member

lazka commented Jan 9, 2018

9 tests are failing due to this, better look at it before 4.0.1

@lazka lazka added this to the 4.0.1 milestone Jan 9, 2018

@declension

This comment has been minimized.

Member

declension commented Jan 9, 2018

Cool. I've noticed this problem a couple of times too actually - adding a test that "fails" but only if you look at debug logs a lot...

@lazka lazka closed this in 2aeea94 Jan 10, 2018

lazka added a commit that referenced this issue Jan 10, 2018

Merge pull request #2707 from lazka/pytest-excepthook
tests: capture exceptions that are not caught during the test execution an reraise them. Fixes #2705

lazka added a commit that referenced this issue Jan 10, 2018

information: another filter() py3 porting bug. Fixes #2704
The test doesn't actually work due to #2705

lazka added a commit that referenced this issue Jan 10, 2018

tests: capture exceptions that are not caught during the test executi…
…on an reraise them. Fixes #2705

Exceptions raised during signals don't bubble to the test caller, instead they
get pushed into sys.excepthook which by default prints them.

This adds a pytest plugin which wraps each test (I think..) collects uncaught exceptions
and reraises them at the end.

This uncovers some bugs in the playlistbrowser tests. Most of the inherited tests were
failing, and I think they never passed, so just remove the inheritance.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment