From b827f021c7d5700b1e6f2d1d2789cb8ce6e173a1 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 24 Aug 2024 14:11:08 +0200 Subject: [PATCH] add logic back, can only be removed in mne>=1.8 --- mne_bids/tests/test_write.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mne_bids/tests/test_write.py b/mne_bids/tests/test_write.py index c707a24e6..2f2c2bb61 100644 --- a/mne_bids/tests/test_write.py +++ b/mne_bids/tests/test_write.py @@ -7,6 +7,7 @@ # SPDX-License-Identifier: BSD-3-Clause import codecs +import inspect import json import os import os.path as op @@ -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)