Skip to content

Commit cb82306

Browse files
Update test_bilateralize to meet mypy and ruff
1 parent a31b6cf commit cb82306

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

message_ix_models/tests/tools/test_bilateralize.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import os
77

88
import pytest
9-
from message_ix import Scenario
109

1110
from message_ix_models import Context, testing
1211
from message_ix_models.tools.bilateralize.bare_to_scenario import bare_to_scenario
@@ -22,7 +21,6 @@
2221
from message_ix_models.tools.bilateralize.prepare_edit import generate_edit_files
2322
from message_ix_models.tools.bilateralize.utils import get_logger, load_config
2423
from message_ix_models.util import package_data_path
25-
from message_ix_models.model.build import apply_spec
2624

2725
# Get logger
2826
log = get_logger(__name__)
@@ -80,11 +78,9 @@ def test_bilat_scenario(request: pytest.FixtureRequest, test_context: Context):
8078
)
8179

8280
# Set up test scenario
83-
test_context.model.time = "year"
84-
test_context.model.type_reg = "global"
8581
test_context.model.regions = "R12"
8682
scen = testing.bare_res(request, test_context)
87-
83+
8884
# Add unit
8985
mp = scen.platform
9086
mp.add_unit("Mt-km")
@@ -118,7 +114,7 @@ def test_bilat_scenario(request: pytest.FixtureRequest, test_context: Context):
118114
# Update additional parameters
119115
update_additional_parameters(scen=scen, extra_parameter_updates=None)
120116

121-
# Remove PAO coal and gas constraints on MESSAGEix-GLOBIOM (but this is test scenario so it should not run)
117+
# Remove PAO coal and gas constraints on MESSAGEix-GLOBIOM (won't run in test)
122118
remove_pao_coal_constraint(scen=scen, log=log, MESSAGEix_GLOBIOM=False)
123119

124-
assert True
120+
assert True

0 commit comments

Comments
 (0)