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

First pass at unhandled errback reporting #62

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

altendky
Copy link
Member

@altendky altendky commented Feb 28, 2019

#4

Draft for:

  • Name[s]
  • Fixture? Decorator? Both?
  • Tests against
    • @inlineCallbacks
    • @ensureDeferred

@altendky
Copy link
Member Author

@meejah, I'm not sure about this.

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.

@altendky
Copy link
Member Author

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 altendky marked this pull request as draft July 20, 2020 17:35
@altendky altendky changed the title [WIP] First pass at unhandled errback reporting First pass at unhandled errback reporting Jul 20, 2020
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.

1 participant