You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The fixture approach can't fail the test without manually adding an assert inside the function which additionally requires that you del or otherwise stop referencing any of the deferreds that might be trouble. So, the upside of the fixture being that you can auto-use it only works if you are willing to have your tests pass with errors.
The decorator lets the code leave the test scope thus no need to del and gets you actual test failures. But, you must manually apply it to every single test manually.
Maybe tomorrow I'll think up some way to auto-apply the decorator. Also, I need to add tests against inlineCallbacks etc.
I suppose the 'automatic decorator' option is having inlineCallbacks/ensureDeferred apply/implement this. It's not automatic to everything but if you are manually handling deferreds... then I guess you get some extra manual stuff to do if you want this. Making this optional would require allowing inlineCallbacks/ensureDeferred to take parameters. I guess I'll need to try to understand decorator again... or maybe that isn't actually necessary. :]
altendky
changed the title
[WIP] First pass at unhandled errback reporting
First pass at unhandled errback reporting
Jul 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#4
Draft for:
@inlineCallbacks@ensureDeferred