Skip to content

Commit

Permalink
Fix the test for the Windows path separator
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelzwiers committed Jan 17, 2024
1 parent 914b8eb commit 898fa0f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,13 @@ def test_get_bidsname(raw_dicomdir):

def test_get_bidsvalue():

bidsfile = '/bids/sub-01/anat/sub-01_acq-foo_run-1_T1w.nii.gz'
bidsfile = Path('/bids/sub-01/anat/sub-01_acq-foo_run-1_T1w.nii.gz')

assert bids.get_bidsvalue(bidsfile, 'acq') == 'foo'
assert bids.get_bidsvalue(bidsfile, 'fallback') == ''
assert bids.get_bidsvalue(bidsfile, 'acq', 'bar') == '/bids/sub-01/anat/sub-01_acq-bar_run-1_T1w.nii.gz'
assert bids.get_bidsvalue(bidsfile, 'fallback', 'bar') == '/bids/sub-01/anat/sub-01_acq-foobar_run-1_T1w.nii.gz'
assert bids.get_bidsvalue(bidsfile, '', 'bar') == '/bids/sub-01/anat/sub-01_acq-foo_run-1_T1w.nii.gz'
assert bids.get_bidsvalue(bidsfile, 'acq', 'bar') == Path('/bids/sub-01/anat/sub-01_acq-bar_run-1_T1w.nii.gz')
assert bids.get_bidsvalue(bidsfile, 'fallback', 'bar') == Path('/bids/sub-01/anat/sub-01_acq-foobar_run-1_T1w.nii.gz')
assert bids.get_bidsvalue(bidsfile, '', 'bar') == Path('/bids/sub-01/anat/sub-01_acq-foo_run-1_T1w.nii.gz')

bidsfile = 'sub-01_run-1_T1w.nii.gz'

Expand Down

0 comments on commit 898fa0f

Please sign in to comment.