def test_ensure_nonstrict(self): tags.STRICT_PARSING = False f = test_common.WarningCounterFilter() logging.getLogger('flvlib.tags').addFilter(f) tags.ensure(1, 2, "error") logging.getLogger('flvlib.tags').removeFilter(f) self.assertEquals(f.warnings, 1)
def test_ensure_noerror(self): tags.STRICT_PARSING = True tags.ensure(1, 1, "no error")