def test_stopOnError(self):
        """
        L{reporter._ExitWrapper} causes a wrapped reporter to stop after its
        first error.
        """
        self.wrapped.addError(self.test, self.failure)
        self.assertTrue(self.wrapped.shouldStop)
        self.assertEqual(self.result.errors, [(self.test, self.failure)])

        L{reporter._ExitWrapper} causes a wrapped reporter to stop after its
        first error.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_reporter.py