def test_logErrorsInThreads(self):
        """
        L{DeterministicThreadPool} will log any exceptions that its "thread"
        workers encounter.
        """
        self.pool, self.doThreadWork = deterministicPool()
        def divideByZero():
            return 1 / 0
        self.pool.callInThread(divideByZero)
        self.doThreadWork()
        self.assertEqual(len(self.flushLoggedErrors(ZeroDivisionError)), 1)

        L{DeterministicThreadPool} will log any exceptions that its "thread"
        workers encounter.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/internet/test/test_resolver.py