Skip to content

Commit

Permalink
add comments to test [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
drammock committed Jan 30, 2025
1 parent e90139f commit 4c59130
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion mne_bids_pipeline/tests/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ def test_session_specific_mri(
for line in (root / _file).read_text().split("\n")
]
(dst_dir / offset / bp.basename).write_text("\n".join(lines))
# for all other files, a simple copy suffices
# For all other files, a simple copy suffices; rewriting
# `raw.info["subject_info"]["his_id"]` is not necessary because MNE-BIDS
# overwrites it with the value in `participants.tsv` anyway.
else:
shutil.copyfile(
src=root / _file, dst=dst_dir / offset / bp.basename
Expand All @@ -328,6 +330,8 @@ def test_session_specific_mri(
dst_dir = new_bids_path.root
files = [f for f in src_dir.iterdir() if f.is_file()]
for _file in files:
# in theory we should rewrite `participants.tsv` to remove the `sub-02` line,
# but in practice it will just get ignored so we won't bother.
shutil.copyfile(src=_file, dst=dst_dir / _file.name)
# now move derivatives (freesurfer files)
src_dir = config_obj.bids_root / "derivatives" / "freesurfer" / "subjects"
Expand Down

0 comments on commit 4c59130

Please sign in to comment.