def test_failsWithoutDeprecation(self):
        """
        L{callDeprecated} raises a test failure if the callable is not
        deprecated.
        """
        def notDeprecated():
            pass
        exception = self.assertRaises(
            self.failureException,
            self.callDeprecated, self.version, notDeprecated)
        self.assertEqual(
            "%r is not deprecated." % notDeprecated, str(exception))

        L{callDeprecated} raises a test failure if the callable is not
        deprecated.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_assertions.py