File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
nibabies/interfaces/tests Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change
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'
You can’t perform that action at this time.
0 commit comments