Skip to content

Commit

Permalink
Mark xarray shading test fail for GMT<=6.1.1 (#649)
Browse files Browse the repository at this point in the history
The xarray shading issue in #364 was fixed by upstream GMT in GenericMappingTools/gmt#4328.

This PR updates the pytest xfail condition so that the xarray shading test is expected to xfail only for GMT<=6.1.1.
  • Loading branch information
seisman authored Oct 15, 2020
1 parent 3613b19 commit a6a0919
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pygmt/tests/test_grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@
import numpy as np
import pytest
import xarray as xr
from packaging.version import Version

from .. import Figure
from .. import Figure, clib
from ..datasets import load_earth_relief
from ..exceptions import GMTInvalidInput
from ..helpers.testing import check_figures_equal

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


@pytest.fixture(scope="module", name="grid")
def fixture_grid():
Expand Down Expand Up @@ -69,7 +73,10 @@ def test_grdimage_file():
return fig


@pytest.mark.xfail(reason="Upstream bug in GMT 6.1.1")
@pytest.mark.xfail(
reason="Upstream bug in GMT 6.1.1",
condition=gmt_version <= Version("6.1.1"),
)
@check_figures_equal()
def test_grdimage_xarray_shading(grid):
"""
Expand Down

0 comments on commit a6a0919

Please sign in to comment.