def checkLogs(result):
            """
            Check that unknown errors are logged.

            @param result: parameter used in L{Deferred}
            """
            logs = self.flushLoggedErrors()
            self.assertEqual(1, len(logs))
            self.assertIsInstance(logs[0].value, AssertionError)

            Check that unknown errors are logged.

            @param result: parameter used in L{Deferred}
            
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_ftp.py