Skip to content

Commit 27d7572

Browse files
committed
Adjust test_macro for pandas 2.0.0, too
1 parent 838143b commit 27d7572

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

message_ix/tests/test_macro.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def test_calc_valid_years(westeros_solved):
7979
data = pd.read_excel(W_DATA_PATH, sheet_name=None, engine="openpyxl")
8080
# Adding an arbitrary year
8181
arbitrary_yr = 2021
82-
gdp_extra_yr = data["gdp_calibrate"].iloc[0, :].copy()
82+
gdp_extra_yr = data["gdp_calibrate"].copy()
8383
gdp_extra_yr["year"] = arbitrary_yr
84-
data["gdp_calibrate"] = data["gdp_calibrate"].append(gdp_extra_yr)
84+
data["gdp_calibrate"] = pd.concat([data["gdp_calibrate"], gdp_extra_yr])
8585
# Check the arbitrary year is not in config
8686
assert arbitrary_yr not in data["config"]["year"]
8787
# But it is in gdp_calibrate

0 commit comments

Comments
 (0)