Skip to content

Commit

Permalink
Fix the log message testing
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhuppmann committed Oct 17, 2023
1 parent 1042938 commit 6d11700
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_feature_aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,9 @@ def test_aggregate_region_with_weights_inconsistent_index(
log_message = "\n0 " + log_message + "model_a scen_a reg_b 2010"
if simple_df.time_domain == "datetime":
time_col = " time"
log_message = log_message.replace("2005", "2005-6-17").replace(" 2010", "2010-07-21")
log_message = log_message.replace(" 2005", "2005-06-17").replace(
" 2010", "2010-07-21"
)
else:
time_col = "year"

Expand All @@ -373,7 +375,7 @@ def test_aggregate_region_with_weights_inconsistent_index(
# missing data row prints a warning (data-index is a subset of weight-index)
exp = simple_df.filter(variable=v, region="World")
if not filter_arg:
exp._data[0] = 1.
exp._data[0] = 1.0
exp._data[1] = 30.0
_df = simple_df.filter(variable=v, region="reg_b", keep=False, **filter_arg)
assert_iamframe_equal(_df.aggregate_region(v, weight=w), exp)
Expand Down

0 comments on commit 6d11700

Please sign in to comment.