def test_assertWarnsError(self):
        """
        Test assertWarns failure when no warning is generated.
        """
        def normal(a):
            return a
        self.assertRaises(self.failureException,
            self.assertWarns, DeprecationWarning, "Woo deprecated", __file__,
            normal, 123)

        Test assertWarns failure when no warning is generated.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_assertions.py