'Ensure that yielding a Deferred directly is trapped as an
error.'

def testDeferredYielding(self):

    def _genDeferred():
        (yield getThing())
    _genDeferred = deprecatedDeferredGenerator(_genDeferred)
    return self.assertFailure(_genDeferred(), TypeError)
