Skip to content

Commit

Permalink
Update the length of the graphs in reporting tests
Browse files Browse the repository at this point in the history
  • Loading branch information
behnam-zakeri committed Jul 4, 2023
1 parent bafae34 commit 63a4b0c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions message_ix/tests/test_reporting.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def test_reporter_from_scenario(message_test_mp):
rep = Reporter.from_scenario(scen)

# Number of quantities available in a rudimentary MESSAGEix Scenario
assert len(rep.graph["all"]) == 128
assert len(rep.graph["all"]) == 129

# Quantities have short dimension names
assert "demand:n-c-l-y-h" in rep
Expand All @@ -69,11 +69,11 @@ def test_reporter_from_scenario(message_test_mp):
assert_qty_equal(obs, demand, check_attrs=False)

# ixmp.Reporter pre-populated with only model quantities and aggregates
assert len(rep_ix.graph) == 5899
assert len(rep_ix.graph) == 5915

# message_ix.Reporter pre-populated with additional, derived quantities
# This is the same value as in test_tutorials.py
assert len(rep.graph) == 13364
assert len(rep.graph) == 13380

# Derived quantities have expected dimensions
vom_key = rep.full_key("vom")
Expand Down
2 changes: 1 addition & 1 deletion message_ix/tests/test_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _t(group: Union[str, None], basename: str, *, check=None, marks=None):
_t("w0", f"{W}_historical_new_capacity"),
_t("w0", f"{W}_multinode"),
# NB this is the same value as in test_reporter()
_t(None, f"{W}_report", check=[("len-rep-graph", 13074)], marks=MARK[2]),
_t(None, f"{W}_report", check=[("len-rep-graph", 13380)], marks=MARK[2]),
_t("at0", "austria", check=[("solve-objective-value", 206321.90625)]),
_t("at0", "austria_single_policy", check=[("solve-objective-value", 205310.34375)]),
_t("at0", "austria_multiple_policies"),
Expand Down

0 comments on commit 63a4b0c

Please sign in to comment.