Skip to content

Commit 1d5e5e5

Browse files
committed
variable renaming
1 parent 2f299d4 commit 1d5e5e5

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

nipy/labs/spatial_models/tests/test_parcel_io.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@ def test_parcel_intra_from_3d_image():
4343
shape = (10, 10, 10)
4444
n_parcel, nn, mu = 10, 6, 1.
4545
mask_image = Nifti1Image(np.ones(shape), np.eye(4))
46-
temp_dir = InTemporaryDirectory()
47-
with temp_dir:
46+
dir_context = InTemporaryDirectory()
47+
with dir_context:
4848
surrogate_3d_dataset(mask=mask_image, out_image_file='image.nii')
4949

5050
#run the algo
5151
for method in ['ward', 'kmeans', 'gkm']:
5252
osp = fixed_parcellation(mask_image, ['image.nii'], n_parcel, nn,
53-
method, temp_dir.name, mu)
53+
method, dir_context.name, mu)
5454
result = 'parcel_%s.nii' % method
5555
assert exists(result)
5656
assert_equal(osp.k, n_parcel)
@@ -65,15 +65,15 @@ def test_parcel_intra_from_3d_images_list():
6565
method = 'ward'
6666
mask_image = Nifti1Image(np.ones(shape), np.eye(4))
6767

68-
temp_dir = InTemporaryDirectory()
69-
with temp_dir:
68+
dir_context = InTemporaryDirectory()
69+
with dir_context:
7070
data_image = ['image_%d.nii' % i for i in range(5)]
7171
for datim in data_image:
7272
surrogate_3d_dataset(mask=mask_image, out_image_file=datim)
7373

7474
#run the algo
7575
osp = fixed_parcellation(mask_image, data_image, n_parcel, nn,
76-
method, temp_dir.name, mu)
76+
method, dir_context.name, mu)
7777
assert exists('parcel_%s.nii' % method)
7878
assert_equal(osp.k, n_parcel)
7979

@@ -86,12 +86,12 @@ def test_parcel_intra_from_4d_image():
8686
n_parcel, nn, mu = 10, 6, 1.
8787
method = 'ward'
8888
mask_image = Nifti1Image(np.ones(shape), np.eye(4))
89-
temp_dir = InTemporaryDirectory()
90-
with temp_dir:
89+
dir_context = InTemporaryDirectory()
90+
with dir_context:
9191
surrogate_3d_dataset(n_subj=10, mask=mask_image,
9292
out_image_file='image.nii')
9393
osp = fixed_parcellation(mask_image, ['image.nii'], n_parcel, nn,
94-
method, temp_dir.name, mu)
94+
method, dir_context.name, mu)
9595
assert exists('parcel_%s.nii' % method)
9696
assert_equal(osp.k, n_parcel)
9797

0 commit comments

Comments
 (0)