Mark two velo tests as xfail due to upstream fixes
fixes a bug related to velo pen settings.
Two velo tests fail due to the upstream bug fixes and are marked as "xfail".
@@ -3,9 +3,13 @@ Tests velo.
"""
import pandas as pd
import pytest
-from pygmt import Figure
+from packaging.version import Version
+from pygmt import Figure, clib
from pygmt.exceptions import GMTInvalidInput
+with clib.Session() as _lib:
+ gmt_version = Version(_lib.info["version"])
+
@pytest.fixture(scope="module", name="dataframe")
def fixture_dataframe():
@@ -26,6 +30,10 @@ def fixture_dataframe():
)
+@pytest.mark.xfail(
+ condition=gmt_version > Version("6.2.0"),
+ reason="Upstream bug fixed by https://github.com/GenericMappingTools/gmt/pull/5360.",
+)
@pytest.mark.mpl_image_compare
def test_velo_numpy_array_numeric_only(dataframe):
"""
@@ -63,6 +71,10 @@ def test_velo_without_spec(dataframe):
fig.velo(data=dataframe)
+@pytest.mark.xfail(
+ condition=gmt_version > Version("6.2.0"),
+ reason="Upstream bug fixed by https://github.com/GenericMappingTools/gmt/pull/5360.",
+)
@pytest.mark.mpl_image_compare
def test_velo_pandas_dataframe(dataframe):
"""
