Skip to content

Commit

Permalink
use --root-dir instead of extra_config
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Jan 17, 2025
1 parent cdc81e1 commit f6d2e6e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions mne_bids_pipeline/tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -348,14 +348,11 @@ def test_session_specific_mri(
dst_file = dst_file.replace(fs_sub, freesurfer_subject_mapping[fs_sub])
shutil.copyfile(src=walk_root / _file, dst=dst_dir / offset / dst_file)
# print_dir_tree(new_bids_path.root) # for debugging
# hack in the new bids_root
extra_config = dict(bids_root=str(new_bids_path.root))
extra_path = tmp_path / "extra_config.py"
extra_path.write_text(str(extra_config))
monkeypatch.setenv("_MNE_BIDS_STUDY_TESTING_EXTRA_CONFIG", str(extra_path))
# Run the tests.
steps = test_options.get("steps", ())
command = ["mne_bids_pipeline", str(config_path), f"--steps={','.join(steps)}"]
# hack in the new bids_root
command.append(f"--root-dir={new_bids_path.root}")
if "--pdb" in sys.argv:
command.append("--n_jobs=1")
monkeypatch.setenv("_MNE_BIDS_STUDY_TESTING", "true")
Expand Down

0 comments on commit f6d2e6e

Please sign in to comment.