88from iam_units import registry
99from pytest import param
1010
11- from message_ix_models .model .transport import build , ldv , testing
12- from message_ix_models .model .transport .testing import MARK , assert_units
11+ from message_ix_models .model .transport import build , ldv
12+ from message_ix_models .model .transport .testing import (
13+ MARK ,
14+ assert_units ,
15+ configure_build ,
16+ )
1317from message_ix_models .project .navigate import T35_POLICY
1418
1519log = logging .getLogger (__name__ )
2024@build .get_computer .minimum_version
2125@pytest .mark .parametrize ("dummy_LDV" , [False , True ])
2226@pytest .mark .parametrize ("years" , ["A" , "B" ])
23- @pytest .mark .parametrize (
24- "regions" ,
25- [
26- param ("ISR" , marks = testing .MARK [3 ]),
27- "R11" ,
28- "R12" ,
29- "R14" ,
30- ],
31- )
27+ @pytest .mark .parametrize ("regions" , [param ("ISR" , marks = MARK [3 ]), "R11" , "R12" , "R14" ])
3228def test_get_ldv_data (tmp_path , test_context , dummy_LDV , regions , years ) -> None :
3329 # Info about the corresponding RES
3430 ctx = test_context
3531 # Prepare a Computer for LDV data calculations
36- c , info = testing . configure_build (
32+ c , info = configure_build (
3733 ctx ,
3834 tmp_path = tmp_path ,
3935 regions = regions ,
@@ -182,7 +178,7 @@ def include(arg):
182178 ],
183179)
184180def test_ldv_capacity_factor (test_context , regions , N_node_loc , years = "B" ):
185- c , _ = testing . configure_build (test_context , regions = regions , years = years )
181+ c , _ = configure_build (test_context , regions = regions , years = years )
186182
187183 result = c .get ("capacity_factor::LDV+ixmp" )
188184 assert {"capacity_factor" } == set (result )
@@ -203,13 +199,13 @@ def test_ldv_capacity_factor(test_context, regions, N_node_loc, years="B"):
203199 (False , "R12" , "B" ),
204200 (False , "R14" , "A" ),
205201 # Not implemented
206- param (False , "ISR" , "A" , marks = testing . MARK [3 ]),
202+ param (False , "ISR" , "A" , marks = MARK [3 ]),
207203 ],
208204)
209205def test_ldv_constraint_data (test_context , dummy_LDV , regions , years ):
210206 # Info about the corresponding RES
211207 ctx = test_context
212- _ , info = testing . configure_build (
208+ _ , info = configure_build (
213209 ctx , regions = regions , years = years , options = {"dummy_LDV" : dummy_LDV }
214210 )
215211
0 commit comments