From b35e2d883b77e11d8392e7adc3693208a81346b7 Mon Sep 17 00:00:00 2001 From: Daniel McCloy Date: Thu, 16 Jan 2025 11:27:09 -0600 Subject: [PATCH] add test --- mne_bids_pipeline/tests/test_validation.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mne_bids_pipeline/tests/test_validation.py b/mne_bids_pipeline/tests/test_validation.py index 126ddee6f..b5c0dd8e2 100644 --- a/mne_bids_pipeline/tests/test_validation.py +++ b/mne_bids_pipeline/tests/test_validation.py @@ -4,7 +4,7 @@ import pytest -from mne_bids_pipeline._config_import import _import_config +from mne_bids_pipeline._config_import import ConfigError, _import_config def test_validation(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: @@ -48,6 +48,11 @@ def test_validation(tmp_path: Path, capsys: pytest.CaptureFixture[str]) -> None: _import_config(config_path=config_path) msg, err = capsys.readouterr() assert msg == err == "" # no new message + # maxfilter extra kwargs + bad_text = working_text + "mf_extra_kws = {'calibration': 'x', 'head_pos': False}\n" + config_path.write_text(bad_text) + with pytest.raises(ConfigError, match="contains keys calibration, head_pos that"): + _import_config(config_path=config_path) # old values bad_text = working_text bad_text += "debug = True\n"