def test_deferredFailureAfterSuccess(self):
        # set up a condition that causes cReactor to hang. These conditions
        # can also be set by other tests when the full test suite is run in
        # alphabetical order (test_flow.FlowTest.testThreaded followed by
        # test_internet.ReactorCoreTestCase.testStop, to be precise). By
        # setting them up explicitly here, we can reproduce the hang in a
        # single precise test case instead of depending upon side effects of
        # other tests.
        #
        # alas, this test appears to flunk the default reactor too

        d = threads.deferToThread(lambda: None)
        d.addCallback(lambda ign: threads.deferToThread(lambda: 1//0))
        return self.assertFailure(d, ZeroDivisionError)
Check that a successfull L{threads.deferToThread} followed by a one
dataset/ETHPy150Open twisted/twisted/twisted/test/test_threads.py/DeferredResultTests.test_deferredFailureAfterSuccess