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

Some support code in trial's own unit tests could use deferLater to be slightly simpler #11612

Closed
exarkun opened this issue Aug 25, 2022 · 0 comments · Fixed by #11613
Closed
Labels

Comments

@exarkun
Copy link
Member

exarkun commented Aug 25, 2022

src/twisted/trial/test/erroneous.py has this:

    def test_fail(self):
        """                                                                                                                                                                       
        A test which fails in the callback of the returned L{defer.Deferred}.                                                                                                     
        """
        d = defer.Deferred()
        d.addCallback(self._later)
        reactor.callLater(0, d.callback, None)
        return d

    def _later(self, res):
        self.fail("I fail later")

twisted.internet.task.deferLater would simplify this a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant