Skip to content

Commit

Permalink
Create new figure for each imshow test
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Jan 15, 2015
1 parent 7b2dbcb commit 5d11520
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions skimage/io/tests/test_mpl_imshow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import numpy as np
from skimage import io
from skimage._shared._warnings import expected_warnings
import matplotlib.pyplot as plt


io.use_plugin('matplotlib', 'imshow')
Expand Down Expand Up @@ -76,6 +77,7 @@ def test_low_dynamic_range():


def test_outside_standard_range():
plt.figure()
with expected_warnings(["out of standard range"]):
ax_im = io.imshow(im_hi)
assert ax_im.get_clim() == (im_hi.min(), im_hi.max())
Expand All @@ -84,6 +86,7 @@ def test_outside_standard_range():


def test_nonstandard_type():
plt.figure()
with expected_warnings(["Non-standard image type"]):
ax_im = io.imshow(im64)
assert ax_im.get_clim() == (im64.min(), im64.max())
Expand All @@ -92,6 +95,7 @@ def test_nonstandard_type():


def test_signed_image():
plt.figure()
im_signed = np.array([[-0.5, -0.2], [0.1, 0.4]])
ax_im = io.imshow(im_signed)
assert ax_im.get_clim() == (-0.5, 0.5)
Expand Down

0 comments on commit 5d11520

Please sign in to comment.