Skip to content

Commit

Permalink
TEST: Add test for failing get_nearest
Browse files Browse the repository at this point in the history
  • Loading branch information
effigies committed Aug 21, 2018
1 parent 307aa37 commit ce0e7a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions grabbit/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ def test_get_nearest(self, bids_layout):
assert len(nearest) == 3
assert nearest[0].subject == '01'

# Check for file with matching run (fails if types don't match)
nearest = bids_layout.get_nearest(
result, type='phasediff', extensions='.nii.gz')
assert nearest is not None
assert os.path.basename(nearest) == 'sub-01_ses-1_run-1_phasediff.nii.gz'

def test_index_regex(self, bids_layout, layout_include):
targ = join('derivatives', 'excluded.json')
assert targ not in bids_layout.files
Expand Down

0 comments on commit ce0e7a6

Please sign in to comment.