def test_filter_errors_no_errors(self): errors = [ Error(INFO, 'msg3'), Error(DEBUG, 'msg4'), Error(NOTSET, 'msg4'), ] assert [] == cmd.filter_errors(errors)
def test_filter_errors_with_min(self): errors = [ Error(CRITICAL, 'msg1'), Error(ERROR, 'msg2'), Error(INFO, 'msg3'), Error(WARNING, 'msg4'), Error(DEBUG, 'msg4'), Error(NOTSET, 'msg4'), ] expected = [ Error(CRITICAL, 'msg1'), ] assert expected == cmd.filter_errors(errors, CRITICAL)
def test_filter_errors_none(self): assert [] == cmd.filter_errors([])