Skip to content

Commit

Permalink
add logic back, can only be removed in mne>=1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
sappelhoff committed Aug 24, 2024
1 parent 2a978c5 commit b827f02
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions mne_bids/tests/test_write.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# SPDX-License-Identifier: BSD-3-Clause

import codecs
import inspect
import json
import os
import os.path as op
Expand Down Expand Up @@ -621,9 +622,13 @@ def test_fif(_bids_validate, tmp_path):
raw2, events2, event_id=event_id, tmin=-0.2, tmax=0.5, preload=True
)
assert_array_almost_equal(raw.get_data(), raw2.get_data())
kwargs = dict()
# XXX: remove logic once support for mne<1.8 is dropped
if "copy" in inspect.getfullargspec(epochs.get_data).kwonlyargs:
kwargs["copy"] = False
assert_array_almost_equal(
epochs.get_data(),
epochs2.get_data(),
epochs.get_data(**kwargs),
epochs2.get_data(**kwargs),
decimal=4,
)
_bids_validate(bids_root)
Expand Down

0 comments on commit b827f02

Please sign in to comment.