'Check that L{threads.deferToThread} return a failure object
with an appropriate exception instance when the called
function raises an exception.'

def test_deferredFailure(self):

    class NewError(Exception, ):
        pass
    def raiseError():
        raise NewError()
    d = threads.deferToThread(raiseError)
    return self.assertFailure(d, NewError)
