Skip to content

Commit a742c9c

Browse files
committed
pacify codacy
1 parent 01a78ec commit a742c9c

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

nipype/workflows/rsfmri/fsl/tests/test_resting.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,16 @@ def test_create_resting_preproc(self, mock_node, mock_realign_wf):
9292
components_data = [line.split()
9393
for line in components_file.read().splitlines()]
9494
num_got_components = len(components_data)
95-
assert (num_got_components == self.num_noise_components or
96-
num_got_components == self.fake_data.shape[3])
95+
if not (num_got_components == self.num_noise_components or
96+
num_got_components == self.fake_data.shape[3]):
97+
raise AssertionError()
9798
first_two = [row[:2] for row in components_data[1:]]
98-
assert first_two == [['-0.5172356654', '-0.6973053243'],
99-
['0.2574722644', '0.1645270737'],
100-
['-0.0806469590', '0.5156853779'],
101-
['0.7187176051', '-0.3235820287'],
102-
['-0.3783072450', '0.3406749013']]
99+
if first_two != [['-0.5172356654', '-0.6973053243'],
100+
['0.2574722644', '0.1645270737'],
101+
['-0.0806469590', '0.5156853779'],
102+
['0.7187176051', '-0.3235820287'],
103+
['-0.3783072450', '0.3406749013']]:
104+
raise AssertionError()
103105

104106
fake_data = np.array([[[[2, 4, 3, 9, 1], [3, 6, 4, 7, 4]],
105107
[[8, 3, 4, 6, 2], [4, 0, 4, 4, 2]]],

0 commit comments

Comments
 (0)