Skip to content

Commit b811d47

Browse files
committed
manually set num_components in test
1 parent 2c551d0 commit b811d47

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

nipype/algorithms/tests/test_CompCor.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,22 @@ def test_compcor(self):
4848

4949
self.run_cc(
5050
CompCor(
51+
num_components=6,
5152
realigned_file=self.realigned_file,
5253
mask_files=self.mask_files,
5354
mask_index=0), expected_components)
5455

5556
self.run_cc(
5657
ACompCor(
58+
num_components=6,
5759
realigned_file=self.realigned_file,
5860
mask_files=self.mask_files,
5961
mask_index=0,
6062
components_file='acc_components_file'), expected_components,
6163
'aCompCor')
6264

6365
def test_tcompcor(self):
64-
ccinterface = TCompCor(
66+
ccinterface = TCompCor(num_components=6,
6567
realigned_file=self.realigned_file, percentile_threshold=0.75)
6668
self.run_cc(ccinterface, [['-0.1114536190', '-0.4632908609'], [
6769
'0.4566907310', '0.6983205193'
@@ -70,7 +72,8 @@ def test_tcompcor(self):
7072
], ['-0.1342351356', '0.1407855119']], 'tCompCor')
7173

7274
def test_tcompcor_no_percentile(self):
73-
ccinterface = TCompCor(realigned_file=self.realigned_file)
75+
ccinterface = TCompCor(num_components=6,
76+
realigned_file=self.realigned_file)
7477
ccinterface.run()
7578

7679
mask = nb.load('mask_000.nii.gz').get_data()
@@ -80,6 +83,7 @@ def test_tcompcor_no_percentile(self):
8083
def test_compcor_no_regress_poly(self):
8184
self.run_cc(
8285
CompCor(
86+
num_components=6,
8387
realigned_file=self.realigned_file,
8488
mask_files=self.mask_files,
8589
mask_index=0,
@@ -160,7 +164,6 @@ def run_cc(self,
160164
assert ccresult.outputs.components_file == expected_file
161165
assert os.path.exists(expected_file)
162166
assert os.path.getsize(expected_file) > 0
163-
assert ccinterface.inputs.num_components == 6
164167

165168
with open(ccresult.outputs.components_file, 'r') as components_file:
166169
expected_n_components = min(ccinterface.inputs.num_components,

0 commit comments

Comments
 (0)