Skip to content

Commit de0734c

Browse files
committed
enh: test cache
1 parent fb96270 commit de0734c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

heudiconv/tests/test_main.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,22 @@ def test_make_readonly(tmpdir):
250250
# and it should go back if we set it back to non-read_only
251251
assert set_readonly(pathname, read_only=False) == rw
252252
assert not is_readonly(pathname)
253+
254+
255+
def test_cache(tmpdir):
256+
tmppath = tmpdir.strpath
257+
args = (
258+
"-f convertall --files %s/axasc35.dcm -s S01"
259+
% (TESTS_DATA_PATH)
260+
).split(' ') + ['-o', tmppath]
261+
runner(args)
262+
263+
cachedir = (tmpdir / '.heudiconv' / 'S01' / 'info')
264+
assert cachedir.exists()
265+
266+
# check individual files
267+
assert (cachedir / 'heuristic.py').exists()
268+
assert (cachedir / 'filegroup.json').exists()
269+
assert (cachedir / 'dicominfo.tsv').exists()
270+
assert (cachedir / 'S01.auto.txt').exists()
271+
assert (cachedir / 'S01.edit.txt').exists()

0 commit comments

Comments
 (0)