Skip to content

Commit 617eb48

Browse files
committed
fixing doctest
1 parent cf30734 commit 617eb48

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

nipype/interfaces/niftyseg/maths.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ class BinaryMaths(MathsCommand):
271271
>>> binary_mul.inputs.operation = 'mul'
272272
>>> binary_mul.inputs.operand_value = 2.0
273273
>>> binary_mul.cmdline # doctest: +ALLOW_UNICODE
274-
'seg_maths im1.nii -mul 2.0 -odt float im1_mul.nii'
274+
'seg_maths im1.nii -mul 2.00000000 -odt float im1_mul.nii'
275275
>>> binary_mul.run() # doctest: +SKIP
276276
>>> # Test llsnorm operation
277277
>>> binary_llsnorm = copy.deepcopy(binary)
@@ -457,7 +457,7 @@ class TupleMaths(MathsCommand):
457457
>>> tuple.inputs.output_datatype = 'float'
458458
459459
>>> # Test lncc operation
460-
>>> tuple_lncc = copy.deepcopy(binary)
460+
>>> tuple_lncc = copy.deepcopy(tuple)
461461
>>> tuple_lncc.inputs.operation = 'lncc'
462462
>>> tuple_lncc.inputs.operand_file1 = 'im2.nii'
463463
>>> tuple_lncc.inputs.operand_value2 = 2.0
@@ -466,7 +466,7 @@ class TupleMaths(MathsCommand):
466466
>>> tuple_lncc.run() # doctest: +SKIP
467467
468468
>>> # Test lssd operation
469-
>>> tuple_lssd = copy.deepcopy(binary)
469+
>>> tuple_lssd = copy.deepcopy(tuple)
470470
>>> tuple_lssd.inputs.operation = 'lssd'
471471
>>> tuple_lssd.inputs.operand_file1 = 'im2.nii'
472472
>>> tuple_lssd.inputs.operand_value2 = 1.0
@@ -475,7 +475,7 @@ class TupleMaths(MathsCommand):
475475
>>> tuple_lssd.run() # doctest: +SKIP
476476
477477
>>> # Test lltsnorm operation
478-
>>> tuple_lltsnorm = copy.deepcopy(binary)
478+
>>> tuple_lltsnorm = copy.deepcopy(tuple)
479479
>>> tuple_lltsnorm.inputs.operation = 'lltsnorm'
480480
>>> tuple_lltsnorm.inputs.operand_file1 = 'im2.nii'
481481
>>> tuple_lltsnorm.inputs.operand_value2 = 0.01

nipype/interfaces/niftyseg/stats.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,23 +218,20 @@ class BinaryStats(StatsCommand):
218218
>>> binary.inputs.in_file = 'im1.nii'
219219
>>> # Test sa operation
220220
>>> binary_sa = copy.deepcopy(binary)
221-
>>> binary_sa = niftyseg.BinaryStats()
222221
>>> binary_sa.inputs.operation = 'sa'
223222
>>> binary_sa.inputs.operand_value = 2.0
224223
>>> binary_sa.cmdline # doctest: +ALLOW_UNICODE
225224
'seg_stats im1.nii -sa 2.00000000'
226225
>>> binary_sa.run() # doctest: +SKIP
227226
>>> # Test ncc operation
228227
>>> binary_ncc = copy.deepcopy(binary)
229-
>>> binary_ncc = niftyseg.BinaryStats()
230228
>>> binary_ncc.inputs.operation = 'ncc'
231229
>>> binary_ncc.inputs.operand_file = 'im2.nii'
232230
>>> binary_ncc.cmdline # doctest: +ALLOW_UNICODE
233231
'seg_stats im1.nii -ncc im2.nii'
234232
>>> binary_ncc.run() # doctest: +SKIP
235233
>>> # Test Nl operation
236234
>>> binary_nl = copy.deepcopy(binary)
237-
>>> binary_nl = niftyseg.BinaryStats()
238235
>>> binary_nl.inputs.operation = 'Nl'
239236
>>> binary_nl.inputs.operand_file = 'output.csv'
240237
>>> binary_nl.cmdline # doctest: +ALLOW_UNICODE

0 commit comments

Comments
 (0)