diff --git a/tests/test_sparse_array.py b/tests/test_sparse_array.py index e088884c..92bd79f0 100644 --- a/tests/test_sparse_array.py +++ b/tests/test_sparse_array.py @@ -710,11 +710,15 @@ def compare_with_sparse(full, sparse): assert np.array_equal(m_array[[False, True], 0][0], position_one) -def test_keep_flyback(electron_data_small): - flyback = SparseArray.from_hdf5(electron_data_small, keep_flyback=True) - assert flyback.scan_shape[1] == 50 - no_flyback = SparseArray.from_hdf5(electron_data_small, keep_flyback=False) - assert no_flyback.scan_shape[1] == 49 +def test_keep_flyback(cropped_multi_frames_v3): + # Test keeping the flyback + flyback = SparseArray.from_hdf5(cropped_multi_frames_v3, keep_flyback=True) + assert flyback.scan_shape[1] == 20 + assert flyback.num_frames_per_scan = 2 + # Test removing the flyback + no_flyback = SparseArray.from_hdf5(cropped_multi_frames_v3, keep_flyback=False) + assert no_flyback.scan_shape[1] == 19 + assert flyback.num_frames_per_scan = 2 # Test binning until this number TEST_BINNING_UNTIL = 33