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

Skip to content

Commit 05b5759

Browse files
committed
TST: add test of deprecated properties
1 parent d46aefb commit 05b5759

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

lib/matplotlib/tests/test_image.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -827,3 +827,11 @@ def test_imshow_float128():
827827
def test_imshow_bool():
828828
fig, ax = plt.subplots()
829829
ax.imshow(np.array([[True, False], [False, True]], dtype=bool))
830+
831+
832+
def test_imshow_deprecated_interd_warn():
833+
im = plt.imshow([[1, 2], [3, np.nan]])
834+
for k in ('_interpd', '_interpdr', 'iterpnames'):
835+
with warnings.catch_warnings(record=True) as warns:
836+
getattr(im, k)
837+
assert len(warns) == 1

0 commit comments

Comments
 (0)