Skip to content

Commit 7d3937c

Browse files
author
Yi Wei
committed
add assertions
1 parent b1d657c commit 7d3937c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/matplotlib/tests/test_axes.py

+2
Original file line numberDiff line numberDiff line change
@@ -1482,6 +1482,7 @@ def test_pcolorargs():
14821482
def test_pcolorargs_with_read_only():
14831483
x = np.arange(6).reshape(2, 3)
14841484
xmask = np.broadcast_to([False, True, False], x.shape) # read-only array
1485+
assert xmask.flags.writeable is False
14851486
masked_x = np.ma.array(x, mask=xmask)
14861487
plt.pcolormesh(masked_x)
14871488

@@ -1490,6 +1491,7 @@ def test_pcolorargs_with_read_only():
14901491
X, Y = np.meshgrid(x, y)
14911492
Z = np.sin(2 * np.pi * X) * np.cos(2 * np.pi * Y)
14921493
Zmask = np.broadcast_to([True, False] * 5, Z.shape)
1494+
assert Zmask.flags.writeable is False
14931495
masked_Z = np.ma.array(Z, mask=Zmask)
14941496
plt.pcolormesh(X, Y, masked_Z)
14951497

0 commit comments

Comments
 (0)