Skip to content

Commit fa20b85

Browse files
committed
tst: fix datalad tests
1 parent 564cb70 commit fa20b85

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/test_heuristics.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_dbic_bids_largely_smoke(tmpdir, heuristic, invocation):
4141
args = (
4242
arg + invocation
4343
).split(' ')
44-
if heuristic != 'dbic_bids' and invocation == 'tests/data':
44+
if heuristic != 'dbic_bids' and invocation == '--files tests/data':
4545
# none other heuristic has mighty infotoids atm
4646
with pytest.raises(NotImplementedError):
4747
runner(args)

tests/test_main.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_prepare_for_datalad(tmpdir):
8686
os.makedirs(studydir_)
8787
populate_bids_templates(studydir_)
8888

89-
add_to_datalad(str(tmpdir), studydir_)
89+
add_to_datalad(str(tmpdir), studydir_, None, False)
9090

9191
from datalad.api import Dataset
9292
superds = Dataset(str(tmpdir))
@@ -114,7 +114,7 @@ def test_prepare_for_datalad(tmpdir):
114114
# Above call to add_to_datalad does not create .heudiconv subds since
115115
# directory does not exist (yet).
116116
# Let's first check that it is safe to call it again
117-
add_to_datalad(str(tmpdir), studydir_)
117+
add_to_datalad(str(tmpdir), studydir_, None, False)
118118
assert not ds.repo.dirty
119119

120120
old_hexsha = ds.repo.get_hexsha()
@@ -126,7 +126,7 @@ def test_prepare_for_datalad(tmpdir):
126126
create_file_if_missing(dummy_path, '')
127127
ds.add(dummy_path, message="added a dummy file")
128128
# next call must not fail, should just issue a warning
129-
add_to_datalad(str(tmpdir), studydir_)
129+
add_to_datalad(str(tmpdir), studydir_, None, False)
130130
ds.repo.is_under_annex(dummy_path)
131131
assert not ds.repo.dirty
132132
assert '.heudiconv/dummy.nii.gz' in ds.repo.get_files()
@@ -135,7 +135,7 @@ def test_prepare_for_datalad(tmpdir):
135135
ds.repo._git_custom_command([], ['git', 'reset', '--hard', old_hexsha])
136136
# now we do not add dummy to git
137137
create_file_if_missing(dummy_path, '')
138-
add_to_datalad(str(tmpdir), studydir_)
138+
add_to_datalad(str(tmpdir), studydir_, None, False)
139139
assert '.heudiconv' in ds.subdatasets(result_xfm='relpaths')
140140
assert not ds.repo.dirty
141141
assert '.heudiconv/dummy.nii.gz' not in ds.repo.get_files()

0 commit comments

Comments
 (0)