def METHOD_NAME(bit, error):
    criteria = VALID_CRITERIA | dict(bit=bit)
    with pytest.raises(ValidationError) as e:
        Criteria(**criteria).to_validated(evaluation_interval=1000, max_signal_bits=2)
    errors = e.value.errors()
    assert errors[0]['msg'] == error