

def test_flushByType(self):
    '\n        Check that flushing the observer remove all failures of the given type.\n        '
    self.test_error()
    f = self._makeRuntimeFailure()
    self.observer.gotEvent(dict(message=(), time=time.time(), isError=1, system='-', failure=f, why=None))
    flushed = self.observer.flushErrors(ZeroDivisionError)
    self.assertEqual(self.observer.getErrors(), [flushed])
    self.assertEqual(len(flushed), 1)
    self.assertTrue(flushed[0].check(ZeroDivisionError))

dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_log.py TestObserver.test_flushByType/VarMisuse@89/138 `f`->`flushed`