def test_flush(self):
        """
        Check that flushing the observer with no args removes all errors.
        """
        self.test_error()
        flushed = self.observer.flushErrors()
        self.assertEqual(self.observer.getErrors(), [])
        self.assertEqual(len(flushed), 1)
        self.assertTrue(flushed[0].check(ZeroDivisionError))

        Check that flushing the observer with no args removes all errors.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/trial/test/test_log.py