diff --git a/ogcore/output_plots.py b/ogcore/output_plots.py index ba0a362bf..99b43b45a 100644 --- a/ogcore/output_plots.py +++ b/ogcore/output_plots.py @@ -76,7 +76,7 @@ def plot_aggregates( assert reform_tpi is not None fig1, ax1 = plt.subplots() for i, v in enumerate(var_list): - assert v in VAR_LABELS.keys() #TODO provide warning message here + assert v in VAR_LABELS.keys(), "{} is not in the list of variable labels".format(v) if plot_type == "pct_diff": if v in ["r_gov", "r", "r_p"]: # Compute just percentage point changes for rates @@ -238,7 +238,7 @@ def plot_industry_aggregates( assert reform_tpi is not None fig1, ax1 = plt.subplots() for i, v in enumerate(var_list): - assert v in VAR_LABELS.keys() #TODO provide warning message here + assert v in VAR_LABELS.keys(), "{} is not in the list of variable labels".format(v) if len(var_list) == 1: var_label = "" else: @@ -451,7 +451,7 @@ def plot_gdp_ratio( start_index = start_year - base_params.start_year fig1, ax1 = plt.subplots() for i, v in enumerate(var_list): - assert v in ToGDP_LABELS.keys() #TODO provide warning message here + assert v in ToGDP_LABELS.keys(), "{} is not in the list of variable labels".format(v) if plot_type == "levels": plot_var_base = ( base_tpi[v][: base_params.T] / base_tpi["Y"][: base_params.T]