Skip to content

Commit b376c97

Browse files
fix test
1 parent ca3d7aa commit b376c97

1 file changed

Lines changed: 12 additions & 8 deletions

File tree

imap_processing/tests/mag/test_mag_validation.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -342,14 +342,18 @@ def test_mag_l2_validation(test_number, mode):
342342

343343
offsets_dataset = offsets_dataset.assign_coords(epoch=magi["epoch"])
344344

345-
# Run the L2 processing
346-
l2 = mag_l2(
347-
calibration_dataset,
348-
offsets_dataset,
349-
magi,
350-
np.datetime64("2025-05-06"),
351-
DataMode[mode.upper()],
352-
)[0]
345+
with patch(
346+
"imap_processing.mag.l2.mag_l2_data.frame_transform",
347+
side_effect=lambda *args, **kwargs: args[1],
348+
):
349+
# Run the L2 processing
350+
l2 = mag_l2(
351+
calibration_dataset,
352+
offsets_dataset,
353+
magi,
354+
np.datetime64("2025-05-06"),
355+
DataMode[mode.upper()],
356+
)[0]
353357

354358
# Compare to expected output
355359
output_file = source_directory / f"imap_mag_l2_{mode}_20250506_v007.csv"

0 commit comments

Comments
 (0)