22
22
test_data_dir = os .path .join (test_dir , "data" )
23
23
24
24
read_types = ["one_file" , "files" , "one_folder" , "folders" , "one_run" , "runs" ]
25
- runs = {"generic" : None , "mpes" : ["30" , "50" ], "flash" : ["43878" , "43878" ], "sxp" : ["0016" , "0016" ]}
25
+ runs = {
26
+ "generic" : None ,
27
+ "mpes" : ["30" , "50" ],
28
+ "flash" : ["43878" , "43878" ],
29
+ "sxp" : ["0016" , "0016" ],
30
+ "cfel" : ["123" ],
31
+ }
26
32
27
33
28
34
def get_loader_name_from_loader_object (loader : BaseLoader ) -> str :
@@ -94,7 +100,7 @@ def test_has_correct_read_dataframe_func(loader: BaseLoader, read_type: str) ->
94
100
assert callable (loader .read_dataframe )
95
101
96
102
# Fix for race condition during parallel testing
97
- if loader .__name__ in {"flash" , "sxp" }:
103
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
98
104
config = deepcopy (loader ._config ) # pylint: disable=protected-access
99
105
config ["core" ]["paths" ]["processed" ] = Path (
100
106
config ["core" ]["paths" ]["processed" ],
@@ -167,7 +173,7 @@ def test_has_correct_read_dataframe_func(loader: BaseLoader, read_type: str) ->
167
173
assert loaded_dataframe .npartitions == expected_size
168
174
assert isinstance (loaded_metadata , dict )
169
175
170
- if loader .__name__ in {"flash" , "sxp" }:
176
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
171
177
loader = cast (FlashLoader , loader )
172
178
loader ._initialize_dirs ()
173
179
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
@@ -183,7 +189,7 @@ def test_timed_dataframe(loader: BaseLoader) -> None:
183
189
"""
184
190
185
191
# Fix for race condition during parallel testing
186
- if loader .__name__ in {"flash" , "sxp" }:
192
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
187
193
config = deepcopy (loader ._config ) # pylint: disable=protected-access
188
194
config ["core" ]["paths" ]["processed" ] = Path (
189
195
config ["core" ]["paths" ]["processed" ],
@@ -201,7 +207,7 @@ def test_timed_dataframe(loader: BaseLoader) -> None:
201
207
collect_metadata = False ,
202
208
)
203
209
if loaded_timed_dataframe is None :
204
- if loader .__name__ in {"flash" , "sxp" }:
210
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
205
211
loader = cast (FlashLoader , loader )
206
212
loader ._initialize_dirs ()
207
213
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
@@ -211,7 +217,7 @@ def test_timed_dataframe(loader: BaseLoader) -> None:
211
217
assert set (loaded_timed_dataframe .columns ).issubset (set (loaded_dataframe .columns ))
212
218
assert loaded_timed_dataframe .npartitions == loaded_dataframe .npartitions
213
219
214
- if loader .__name__ in {"flash" , "sxp" }:
220
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
215
221
loader = cast (FlashLoader , loader )
216
222
loader ._initialize_dirs ()
217
223
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
@@ -227,7 +233,7 @@ def test_get_count_rate(loader: BaseLoader) -> None:
227
233
"""
228
234
229
235
# Fix for race condition during parallel testing
230
- if loader .__name__ in {"flash" , "sxp" }:
236
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
231
237
config = deepcopy (loader ._config ) # pylint: disable=protected-access
232
238
config ["core" ]["paths" ]["processed" ] = Path (
233
239
config ["core" ]["paths" ]["processed" ],
@@ -246,7 +252,7 @@ def test_get_count_rate(loader: BaseLoader) -> None:
246
252
)
247
253
loaded_time , loaded_countrate = loader .get_count_rate ()
248
254
if loaded_time is None and loaded_countrate is None :
249
- if loader .__name__ in {"flash" , "sxp" }:
255
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
250
256
loader = cast (FlashLoader , loader )
251
257
loader ._initialize_dirs ()
252
258
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
@@ -261,7 +267,7 @@ def test_get_count_rate(loader: BaseLoader) -> None:
261
267
with pytest .raises (TypeError ):
262
268
loader .get_count_rate (illegal_kwd = True )
263
269
264
- if loader .__name__ in {"flash" , "sxp" }:
270
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
265
271
loader = cast (FlashLoader , loader )
266
272
loader ._initialize_dirs ()
267
273
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
@@ -277,7 +283,7 @@ def test_get_elapsed_time(loader: BaseLoader) -> None:
277
283
"""
278
284
279
285
# Fix for race condition during parallel testing
280
- if loader .__name__ in {"flash" , "sxp" }:
286
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
281
287
config = deepcopy (loader ._config ) # pylint: disable=protected-access
282
288
config ["core" ]["paths" ]["processed" ] = Path (
283
289
config ["core" ]["paths" ]["processed" ],
@@ -311,7 +317,7 @@ def test_get_elapsed_time(loader: BaseLoader) -> None:
311
317
with pytest .raises (TypeError ):
312
318
loader .get_elapsed_time (illegal_kwd = True )
313
319
314
- if loader .__name__ in {"flash" , "sxp" }:
320
+ if loader .__name__ in {"flash" , "sxp" , "cfel" }:
315
321
loader = cast (FlashLoader , loader )
316
322
loader ._initialize_dirs ()
317
323
for file in os .listdir (Path (loader .processed_dir , "buffer" )):
0 commit comments