Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for mask in GeoQuadMesh.get_array test #2174

Merged
merged 1 commit into from
May 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/cartopy/tests/mpl/test_mpl_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ def test_pcolormesh_get_array_with_mask():
assert c._wrapped_collection_fix is not None, \
'No pcolormesh wrapping was done when it should have been.'

assert np.array_equal(data.ravel(), c.get_array()), \
result = c.get_array()
assert not np.ma.is_masked(result)
assert np.array_equal(data.ravel(), result), \
'Data supplied does not match data retrieved in wrapped case'

ax.coastlines()
Expand All @@ -306,7 +308,9 @@ def test_pcolormesh_get_array_with_mask():
assert getattr(c, "_wrapped_collection_fix", None) is None, \
'pcolormesh wrapping was done when it should not have been.'

assert np.array_equal(data2.ravel(), c.get_array()), \
result = c.get_array()
assert not np.ma.is_masked(result)
assert np.array_equal(data2.ravel(), result), \
'Data supplied does not match data retrieved in unwrapped case'


Expand Down