Skip to content

Commit 860b56e

Browse files
committed
fix(test): Do not close figure before using axes
1 parent a5c35c2 commit 860b56e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nibabel/tests/test_viewers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ def test_viewer():
8686

8787
# other cases
8888
fig, axes = plt.subplots(1, 4)
89-
plt.close(fig)
9089
v1 = OrthoSlicer3D(data, axes=axes)
9190
aff = np.array([[0, 1, 0, 3], [-1, 0, 0, 2], [0, 0, 2, 1], [0, 0, 0, 1]], float)
9291
v2 = OrthoSlicer3D(data, affine=aff, axes=axes[:3])
@@ -102,6 +101,7 @@ def test_viewer():
102101
v2.link_to(v1) # shouldn't do anything
103102
v1.close()
104103
v2.close()
104+
plt.close(fig)
105105

106106

107107
@needs_mpl

0 commit comments

Comments
 (0)