Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1aebff1

Browse files
committed
TST: add flat-field test
1 parent 346bb1a commit 1aebff1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/matplotlib/tests/test_image.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,15 @@ def test_imshow_no_warn_invalid():
780780
assert len(warns) == 0
781781

782782

783+
@image_comparison(baseline_images=['imshow_flatfield'],
784+
remove_text=True, style='mpl20',
785+
extensions=['png'])
786+
def test_imshow_flatfield():
787+
fig, ax = plt.subplots()
788+
im = ax.imshow(np.ones((5, 5)))
789+
im.set_clim(.5, 1.5)
790+
791+
783792
def test_empty_imshow():
784793
fig, ax = plt.subplots()
785794
im = ax.imshow([[]])

0 commit comments

Comments
 (0)