Skip to content

Commit

Permalink
Mark test_{from_url,get_remove_ts} as Xfail with ixmp 3.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
khaeru committed Oct 30, 2023
1 parent df179bd commit 519bdfc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion message_ix_models/tests/report/test_compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from ..test_report import MARK, ss_reporter


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

Expand Down
4 changes: 4 additions & 0 deletions message_ix_models/tests/report/test_computations.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
share_curtailment,
)

from ..test_report import MARK


@pytest.fixture
def c() -> Computer:
Expand Down Expand Up @@ -76,6 +78,7 @@ def test_filter_ts():
assert {"ar"} == set(result.variable.unique())


@MARK[0]
def test_from_url(scenario):
full_url = f"ixmp://{scenario.platform.name}/{scenario.url}"

Expand All @@ -92,6 +95,7 @@ def test_from_url(scenario):
assert scenario.url == result.url


@MARK[0]
def test_get_remove_ts(caplog, scenario):
# get_ts() runs
result0 = get_ts(scenario)
Expand Down
12 changes: 8 additions & 4 deletions message_ix_models/tests/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
}

MARK = (
pytest.mark.xfail(
condition=version("message_ix") < "3.5",
reason="Not supported with message_ix < 3.5",
),
pytest.mark.xfail(
condition=version("message_ix") < "3.6",
raises=NotImplementedError,
Expand All @@ -44,7 +48,7 @@ def _cb(*args):
register(_cb)


@MARK[0]
@MARK[1]
def test_report_bare_res(request, test_context):
"""Prepare and run the standard MESSAGE-GLOBIOM reporting on a bare RES."""
scenario = testing.bare_res(request, test_context, solved=True)
Expand Down Expand Up @@ -124,7 +128,7 @@ def test_report_legacy(caplog, request, tmp_path, test_context):
)


@MARK[0]
@MARK[1]
@pytest.mark.parametrize("regions", ["R11"])
def test_apply_units(request, test_context, regions):
test_context.regions = regions
Expand Down Expand Up @@ -242,7 +246,7 @@ def ss_reporter():
return rep


@MARK[0]
@MARK[1]
def test_add_simulated_solution(test_context, test_data_path):
# Simulated solution can be added to an empty Reporter
rep = ss_reporter()
Expand Down Expand Up @@ -270,7 +274,7 @@ def test_add_simulated_solution(test_context, test_data_path):
assert np.isclose(79.76478, value.item())


@MARK[0]
@MARK[1]
def test_prepare_reporter(test_context):
rep = ss_reporter()
N = len(rep.graph)
Expand Down

0 comments on commit 519bdfc

Please sign in to comment.