def test_logErrorLogsError(self):
        """
        L{defer.logError} logs the given error.
        """
        error = failure.Failure(RuntimeError())
        defer.logError(error)
        errors = self.flushLoggedErrors(RuntimeError)

        self.assertEqual(errors, [error])

        L{defer.logError} logs the given error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_defer.py