diff --git a/pygmt/tests/test_binstats.py b/pygmt/tests/test_binstats.py index 9d633aebf3e..53626f16364 100644 --- a/pygmt/tests/test_binstats.py +++ b/pygmt/tests/test_binstats.py @@ -6,7 +6,9 @@ import numpy.testing as npt import pytest +from packaging.version import Version from pygmt import binstats +from pygmt.clib import __gmt_version__ from pygmt.enums import GridRegistration, GridType from pygmt.helpers import GMTTempFile @@ -51,6 +53,11 @@ def test_binstats_no_outgrid(): npt.assert_allclose(temp_grid.mean(), 4227489) +# TODO(GMT>=6.5.0): Remove the xfail marker for the upstream bug fixed in GMT 6.5.0. +@pytest.mark.xfail( + condition=Version(__gmt_version__) < Version("6.5.0"), + reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8243", +) def test_binstats_quantile(): """ Test binstats quantile statistic functionality. @@ -67,6 +74,7 @@ def test_binstats_quantile(): assert temp_grid.dims == ("y", "x") assert temp_grid.gmt.gtype is GridType.CARTESIAN assert temp_grid.gmt.registration is GridRegistration.GRIDLINE + assert temp_grid.dtype == "float32" npt.assert_allclose(temp_grid.max(), 15047685) npt.assert_allclose(temp_grid.min(), 53) npt.assert_allclose(temp_grid.median(), 543664.5)