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

Mark test_accessor_sliced_datacube as xfail due to upstream bug #1895

Merged
merged 1 commit into from
Apr 25, 2022
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
12 changes: 10 additions & 2 deletions pygmt/tests/test_accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@

import pytest
import xarray as xr
from pygmt import which
from packaging.version import Version
from pygmt import clib, which
from pygmt.exceptions import GMTInvalidInput

with clib.Session() as _lib:
gmt_version = Version(_lib.info["version"])


def test_accessor_gridline_cartesian():
"""
Expand Down Expand Up @@ -70,6 +74,10 @@ def test_accessor_set_non_boolean():
grid.gmt.gtype = 2


@pytest.mark.skipif(
gmt_version < Version("6.4.0"),
reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/6615",
)
def test_accessor_sliced_datacube():
"""
Check that a 2D grid which is sliced from an n-dimensional datacube works
Expand All @@ -87,6 +95,6 @@ def test_accessor_sliced_datacube():
grid = dataset.sel(level=500, month=1, drop=True).z

assert grid.gmt.registration == 0 # gridline registration
assert grid.gmt.gtype == 0 # cartesian coordinate type
assert grid.gmt.gtype == 1 # geographic coordinate type
finally:
os.remove(fname)