Skip to content

Commit b04d4e7

Browse files
author
Shoshana Berleant
committed
better test
1 parent 4f27943 commit b04d4e7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

nipype/algorithms/tests/test_compcor.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,18 @@ def test_tcompcor_asymmetric_dim(self):
8484
def test_compcor_bad_input_shapes(self):
8585
shape_less_than = (1, 2, 2, 5) # dim 0 is < dim 0 of self.mask_file (2)
8686
shape_more_than = (3, 3, 3, 5) # dim 0 is > dim 0 of self.mask_file (2)
87-
bad_dims = (2, 2, 2) # not 4-D
8887

89-
for data_shape in (shape_less_than, shape_more_than, bad_dims):
88+
for data_shape in (shape_less_than, shape_more_than):
9089
data_file = utils.save_toy_nii(np.zeros(data_shape), 'temp.nii')
9190
interface = CompCor(realigned_file=data_file, mask_file=self.mask_file)
9291
self.assertRaisesRegexp(ValueError, "dimensions", interface.run)
9392

93+
def test_tcompcor_bad_input_dim(self):
94+
bad_dims = (2, 2, 2)
95+
data_file = utils.save_toy_nii(np.zeros(bad_dims), 'temp.nii')
96+
interface = TCompCor(realigned_file=data_file)
97+
self.assertRaisesRegexp(ValueError, '4-D', interface.run)
98+
9499
def run_cc(self, ccinterface, expected_components):
95100
# run
96101
ccresult = ccinterface.run()

0 commit comments

Comments
 (0)