def test_deferredCallback(self):
        filters = [(("ignore", ".*foo.*"), {}),
                   (("ignore", ".*bar.*"), {})]
        result = Deferred()
        self.runWithWarningsSuppressed(filters, lambda: result)
        warnings.warn("ignore foo")
        result.callback(3)
        warnings.warn("ignore foo 2")
        self.assertEqual(
            ["ignore foo 2"], [w['message'] for w in self.flushWarnings()])
If the function called by L{utils.runWithWarningsSuppressed} returns a
dataset/ETHPy150Open twisted/twisted/twisted/test/test_iutils.py/DeferredSuppressedWarningsTests.test_deferredCallback