def _localCallbackErrorLoggingTest(self, callResult):
        """
        Verify that C{callResult} completes with a L{None} result and that an
        unhandled error has been logged.
        """
        finalResult = []
        callResult.addBoth(finalResult.append)

        self.assertEqual(1, len(self.sender.unhandledErrors))
        self.assertIsInstance(
            self.sender.unhandledErrors[0].value, ZeroDivisionError)

        self.assertEqual([None], finalResult)

        Verify that C{callResult} completes with a L{None} result and that an
        unhandled error has been logged.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/test/test_amp.py