def test_inCallback(self):
        """
        Test that errors logged in callbacks get reported as test errors.
        """
        test = self.MockTest('test_inCallback')
        test(self.result)
        self.assertEqual(len(self.result.errors), 1)
        self.assertTrue(self.result.errors[0][1].check(ZeroDivisionError),
                        self.result.errors[0][1])

        Test that errors logged in callbacks get reported as test errors.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_log.py