Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Jan 16, 2025
1 parent 647b830 commit b35e2d8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mne_bids_pipeline/tests/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit b35e2d8

Please sign in to comment.