def test_check_if_single_value_flagged_validation_error(flag): with pytest.raises(ValueError): quality_mapping.check_if_single_value_flagged(flag, 'OK')
def test_check_if_single_value_flagged_key_error(desc): with pytest.raises(KeyError): quality_mapping.check_if_single_value_flagged(2, desc)
def test_check_if_single_value_flagged(flag, desc, result): flag |= quality_mapping.LATEST_VERSION_FLAG out = quality_mapping.check_if_single_value_flagged(flag, desc) assert out == result