Skip to content

Commit a43feb4

Browse files
committed
Temporarily xfail two transport tests for #281
1 parent 5dc580f commit a43feb4

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

message_ix_models/model/transport/testing.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@
99

1010
import pytest
1111
from genno import Computer
12-
from message_ix import Reporter, Scenario
12+
from message_ix import ModelError, Reporter, Scenario
1313

1414
import message_ix_models.report
15-
from message_ix_models import Context, ScenarioInfo, testing
15+
from message_ix_models import Context, ScenarioInfo
1616
from message_ix_models.report.sim import add_simulated_solution
17+
from message_ix_models.testing import GHA, bare_res
1718
from message_ix_models.util import silence_log
1819
from message_ix_models.util.graphviz import HAS_GRAPHVIZ
1920

@@ -38,9 +39,13 @@
3839
4: pytest.mark.xfail(reason="Currently unsupported"),
3940
# Tests that fail with data that cannot be migrated from message_data
4041
7: pytest.mark.xfail(
41-
condition=testing.GHA and platform.system() == "Darwin" and not HAS_GRAPHVIZ,
42+
condition=GHA and platform.system() == "Darwin" and not HAS_GRAPHVIZ,
4243
reason="Graphviz missing on macos-13 GitHub Actions runners",
4344
),
45+
8: pytest.mark.xfail(
46+
raises=ModelError,
47+
reason="Temporary, for https://github.com/iiasa/message-ix-models/pull/281",
48+
),
4449
}
4550

4651
make_mark: dict[int, Callable[..., pytest.MarkDecorator]] = {
@@ -104,7 +109,7 @@ def built_transport(
104109
options = options or dict()
105110

106111
# Retrieve (maybe generate) the bare RES with the same settings
107-
res = testing.bare_res(request, context, solved)
112+
res = bare_res(request, context, solved)
108113

109114
# Derive the name for the transport scenario
110115
model_name = res.model.replace("-GLOBIOM", "-Transport")

message_ix_models/tests/model/transport/test_build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ def test_make_spec(regions_arg, regions_exp, years):
6262
param("R11", "B", False, "IKARUS", False, marks=[mark.slow, MARK[1]]),
6363
param("R11", "B", False, "IKARUS", True, marks=[mark.slow, MARK[1]]),
6464
# R12, B
65-
("R12", "B", False, "IKARUS", True),
65+
param("R12", "B", False, "IKARUS", True, marks=MARK[8]),
6666
# R14, A
6767
param(
6868
"R14",

message_ix_models/tests/model/transport/test_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ def test_configure_legacy():
6060
"regions, years",
6161
(
6262
param("R11", "A", marks=make_mark[2](ValueError)),
63-
("R12", "A"),
63+
param("R12", "A", marks=MARK[8]),
6464
param("R14", "A", marks=make_mark[2](genno.ComputationError)),
6565
param("ISR", "A", marks=MARK[3]),
6666
),

0 commit comments

Comments
 (0)