Skip to content

Commit

Permalink
TST start modifying tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmainak committed Oct 14, 2018
1 parent 32b2cf8 commit 4146d43
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions mne_bids/tests/test_mne_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from mne.utils import _TempDir, run_subprocess
from mne.io.constants import FIFF

from mne_bids import raw_to_bids, make_bids_filename
from mne_bids import write_raw_bids, make_bids_filename

base_path = op.join(op.dirname(mne.__file__), 'io')
subject_id = '01'
Expand Down Expand Up @@ -53,10 +53,12 @@ def test_fif():
events_fname = op.join(data_path, 'MEG', 'sample',
'sample_audvis_trunc_raw-eve.fif')

raw_to_bids(subject_id=subject_id, session_id=session_id, run=run,
acquisition=acq, task=task, raw_file=raw_fname,
events_data=events_fname, output_path=output_path,
event_id=event_id, overwrite=True)
raw = mne.io.read_raw_fif(raw_fname)
bids_fname = make_bids_filename(
subject_id=subject_id, session_id=session_id, run=run, acquisition=acq,
task=task, suffix='meg.fif')
write_raw_bids(raw, bids_fname, output_path, events_data=events_fname,
event_id=event_id, overwrite=True)

# give the raw object some fake participant data
raw = mne.io.read_raw_fif(raw_fname)
Expand All @@ -66,10 +68,10 @@ def test_fif():
data_path2 = _TempDir()
raw_fname2 = op.join(data_path2, 'sample_audvis_raw.fif')
raw.save(raw_fname2)
raw_to_bids(subject_id=subject_id2, run=run, task=task, acquisition=acq,
session_id=session_id, raw_file=raw_fname2,
events_data=events_fname, output_path=output_path,
event_id=event_id, overwrite=True)

bids_fname = bids_fname.replace(subject_id, subject_id2)
write_raw_bids(raw, bids_fname, output_path, event_data=events_fname,
event_id=event_id, overwrite=True)
cmd = ['bids-validator', output_path]
run_subprocess(cmd, shell=shell)

Expand Down

0 comments on commit 4146d43

Please sign in to comment.