Skip to content

Commit 0745dc4

Browse files
committed
tst: add test
1 parent 3d9406c commit 0745dc4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from pathlib import Path
2+
3+
from nibabies.interfaces.download import RetrievePoochFiles
4+
5+
6+
def test_RetrievePoochFiles(tmp_path, monkeypatch):
7+
monkeypatch.chdir(tmp_path)
8+
getter = RetrievePoochFiles(intermediate='MNIInfant:cohort-1', target='MNI152NLin6Asym')
9+
outputs = getter.run().outputs
10+
assert Path(outputs.int2tgt_xfm).exists()
11+
assert Path(outputs.tgt2int_xfm).exists()
12+
13+
cache = tmp_path / 'mycache'
14+
monkeypatch.setenv('NIBABIES_POOCH_DIR', cache)
15+
getter = RetrievePoochFiles(intermediate='MNIInfant:cohort-1', target='MNI152NLin6Asym')
16+
outputs = getter.run().outputs
17+
18+
assert Path(outputs.int2tgt_xfm) == cache / 'from-MNIInfant+1_to-MNI152NLin6Asym_xfm.h5'
19+
assert Path(outputs.tgt2int_xfm) == cache / 'from-MNI152NLin6Asym_to-MNIInfant+1_xfm.h5'

0 commit comments

Comments
 (0)