Skip to content

Commit

Permalink
Check specific values in test_compat()
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Oct 20, 2023
1 parent 283ea55 commit d0f198d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion message_ix_models/tests/report/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

@MARK[0]
def test_compat(test_context):
import numpy.testing as npt

rep = ss_reporter()
prepare_reporter(test_context, reporter=rep)

Expand All @@ -24,13 +26,22 @@ def test_compat(test_context):
# key = "_26" # Fourth level

# print(rep.describe(key))
# rep.visualize("transport-emissions-full-iamc.svg", key)

# Calculation runs
result = rep.get(key)

# print(result.to_string())
# print(result.as_pandas().to_string())
del result

# Check a specific value
# TODO Expand set of expected values
npt.assert_allclose(
result.as_pandas()
.query("region == 'R11_AFR' and year == 2020")["value"]
.item(),
54.0532,
)


def test_prepare_techs(test_context):
Expand Down

0 comments on commit d0f198d

Please sign in to comment.