@@ -106,6 +106,23 @@ def test_fetch_mas_data_keys_exist_in_registry(fake_fetch):
106106 assert key in sa .FETCHER .registry , f"{ key } not in registry"
107107
108108
109+ def test_fetch_mas_returns_ordered_namedtuple (fake_fetch ):
110+ paths = sa .fetch_mas_data (domains = "cor" , variables = "br,bt,bp" , hdf = 5 )
111+ assert paths ._fields == ("cor_br" , "cor_bt" , "cor_bp" )
112+ assert paths [0 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/mhd/br002.h5" )
113+ assert paths [1 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/mhd/bt002.h5" )
114+ assert paths [2 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/mhd/bp002.h5" )
115+
116+
117+ def test_fetch_mas_returns_ordered_namedtuple_with_multiple_domains (fake_fetch ):
118+ paths = sa .fetch_mas_data (domains = "cor,hel" , variables = "br,bt" , hdf = 5 )
119+ assert paths ._fields == ("cor_br" , "cor_bt" , "hel_br" , "hel_bt" )
120+ assert paths [0 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/mhd/br002.h5" )
121+ assert paths [1 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/mhd/bt002.h5" )
122+ assert paths [2 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/hel/mhd/br002.h5" )
123+ assert paths [3 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/hel/mhd/bt002.h5" )
124+
125+
109126# --- fetch_pot3d_data --------------------------------------------------------
110127
111128def test_fetch_pot3d_data_default (fake_fetch ):
@@ -119,6 +136,14 @@ def test_fetch_pot3d_data_none_fetches_all_components(fake_fetch):
119136 assert set (paths ._fields ) == {"br" , "bt" , "bp" }
120137
121138
139+ def test_fetch_pot3d_returns_ordered_namedtuple (fake_fetch ):
140+ paths = sa .fetch_pot3d_data (variables = "br,bt,bp" , hdf = 5 )
141+ assert paths ._fields == ("br" , "bt" , "bp" )
142+ assert paths [0 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/pfss/br.h5" )
143+ assert paths [1 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/pfss/bt.h5" )
144+ assert paths [2 ] == Path ("H5CR2309_hmi_mast_mas_std_0201/cor/pfss/bp.h5" )
145+
146+
122147# --- fetch_mas_quantities ----------------------------------------------------
123148
124149def test_fetch_mas_quantities_default (fake_fetch ):
0 commit comments