Skip to content

Commit

Permalink
[circle skip]
Browse files Browse the repository at this point in the history
add docstring; enforce arrange-act-assert
  • Loading branch information
dmalt committed Aug 14, 2023
1 parent ab08a3f commit 07e02c5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mne/tests/test_epochs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1542,16 +1542,19 @@ def test_split_saving(tmp_path, epochs_to_split, preload):
epochs, split_size, n_files = epochs_to_split
epochs_data = epochs.get_data()
fname = tmp_path / "test-epo.fif"
epochs.save(fname, split_size=split_size, overwrite=True)
got_size = _get_split_size(split_size)

epochs.save(fname, split_size=split_size, overwrite=True)
epochs2 = mne.read_epochs(fname, preload=preload)

_assert_splits(fname, n_files, got_size)
assert not fname.with_name(f"{fname.stem}-{n_files + 1}{fname.suffix}").is_file()
epochs2 = mne.read_epochs(fname, preload=preload)
assert_allclose(epochs2.get_data(), epochs_data)
assert_array_equal(epochs.events, epochs2.events)


def test_split_naming(tmp_path, epochs_to_split):
"""Test naming of the split files."""
epochs, _, n_files = epochs_to_split
# Check that if BIDS is used and no split is needed it defaults to
# simple writing without _split- entity.
Expand Down

0 comments on commit 07e02c5

Please sign in to comment.