1313
1414import nibabel as nib
1515from nibabel .cmdline import convert
16- from nibabel .testing import test_data
16+ from nibabel .testing import get_test_data
1717
1818
1919def test_convert_noop (tmp_path ):
20- infile = test_data (fname = 'anatomical.nii' )
20+ infile = get_test_data (fname = 'anatomical.nii' )
2121 outfile = tmp_path / 'output.nii.gz'
2222
2323 orig = nib .load (infile )
@@ -31,7 +31,7 @@ def test_convert_noop(tmp_path):
3131 assert converted .shape == orig .shape
3232 assert converted .get_data_dtype () == orig .get_data_dtype ()
3333
34- infile = test_data (fname = 'resampled_anat_moved.nii' )
34+ infile = get_test_data (fname = 'resampled_anat_moved.nii' )
3535
3636 with pytest .raises (FileExistsError ):
3737 convert .main ([str (infile ), str (outfile )])
@@ -50,7 +50,7 @@ def test_convert_noop(tmp_path):
5050
5151@pytest .mark .parametrize ('data_dtype' , ('u1' , 'i2' , 'float32' , 'float' , 'int64' ))
5252def test_convert_dtype (tmp_path , data_dtype ):
53- infile = test_data (fname = 'anatomical.nii' )
53+ infile = get_test_data (fname = 'anatomical.nii' )
5454 outfile = tmp_path / 'output.nii.gz'
5555
5656 orig = nib .load (infile )
@@ -78,7 +78,7 @@ def test_convert_dtype(tmp_path, data_dtype):
7878 ],
7979)
8080def test_convert_by_extension (tmp_path , ext , img_class ):
81- infile = test_data (fname = 'anatomical.nii' )
81+ infile = get_test_data (fname = 'anatomical.nii' )
8282 outfile = tmp_path / f'output.{ ext } '
8383
8484 orig = nib .load (infile )
@@ -102,7 +102,7 @@ def test_convert_by_extension(tmp_path, ext, img_class):
102102 ],
103103)
104104def test_convert_imgtype (tmp_path , ext , img_class ):
105- infile = test_data (fname = 'anatomical.nii' )
105+ infile = get_test_data (fname = 'anatomical.nii' )
106106 outfile = tmp_path / f'output.{ ext } '
107107
108108 orig = nib .load (infile )
@@ -118,7 +118,7 @@ def test_convert_imgtype(tmp_path, ext, img_class):
118118
119119
120120def test_convert_nifti_int_fail (tmp_path ):
121- infile = test_data (fname = 'anatomical.nii' )
121+ infile = get_test_data (fname = 'anatomical.nii' )
122122 outfile = tmp_path / f'output.nii'
123123
124124 orig = nib .load (infile )
0 commit comments