|
9 | 9 |
|
10 | 10 | import pytest
|
11 | 11 | from genno import Computer
|
12 |
| -from message_ix import Reporter, Scenario |
| 12 | +from message_ix import ModelError, Reporter, Scenario |
13 | 13 |
|
14 | 14 | import message_ix_models.report
|
15 |
| -from message_ix_models import Context, ScenarioInfo, testing |
| 15 | +from message_ix_models import Context, ScenarioInfo |
16 | 16 | from message_ix_models.report.sim import add_simulated_solution
|
| 17 | +from message_ix_models.testing import GHA, bare_res |
17 | 18 | from message_ix_models.util import silence_log
|
18 | 19 | from message_ix_models.util.graphviz import HAS_GRAPHVIZ
|
19 | 20 |
|
|
38 | 39 | 4: pytest.mark.xfail(reason="Currently unsupported"),
|
39 | 40 | # Tests that fail with data that cannot be migrated from message_data
|
40 | 41 | 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, |
42 | 43 | reason="Graphviz missing on macos-13 GitHub Actions runners",
|
43 | 44 | ),
|
| 45 | + 8: pytest.mark.xfail( |
| 46 | + raises=ModelError, |
| 47 | + reason="Temporary, for https://github.com/iiasa/message-ix-models/pull/281", |
| 48 | + ), |
44 | 49 | }
|
45 | 50 |
|
46 | 51 | make_mark: dict[int, Callable[..., pytest.MarkDecorator]] = {
|
@@ -104,7 +109,7 @@ def built_transport(
|
104 | 109 | options = options or dict()
|
105 | 110 |
|
106 | 111 | # 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) |
108 | 113 |
|
109 | 114 | # Derive the name for the transport scenario
|
110 | 115 | model_name = res.model.replace("-GLOBIOM", "-Transport")
|
|
0 commit comments