diff --git a/pygmt/tests/baseline/test_solar_terminators.png.dvc b/pygmt/tests/baseline/test_solar_terminators.png.dvc index 87f3cd2e80a..ead1e8f5375 100644 --- a/pygmt/tests/baseline/test_solar_terminators.png.dvc +++ b/pygmt/tests/baseline/test_solar_terminators.png.dvc @@ -1,4 +1,5 @@ outs: -- md5: 8325728360e1d302bb9abbb681b41cc6 - size: 42122 +- md5: a426e3b83eb29dbc273a480d9c3019e1 + size: 43708 path: test_solar_terminators.png + hash: md5 diff --git a/pygmt/tests/test_solar.py b/pygmt/tests/test_solar.py index e97f3742b20..29d031a947a 100644 --- a/pygmt/tests/test_solar.py +++ b/pygmt/tests/test_solar.py @@ -5,39 +5,31 @@ import datetime import pytest +from packaging.version import Version from pygmt import Figure +from pygmt.clib import __gmt_version__ from pygmt.exceptions import GMTParameterError, GMTValueError from pygmt.params import Axis +# TODO(GMT>6.6.0): Remove the xfail marker. +@pytest.mark.xfail( + condition=Version(__gmt_version__) <= Version("6.6.0"), + reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8938", +) @pytest.mark.mpl_image_compare def test_solar_terminators(): """ Test passing the solar argument with a time string and no terminator type to confirm the default terminator type. """ + dt = "1990-02-17 04:25:00" fig = Figure() fig.basemap(region="d", projection="W0/15c", frame=Axis(annot=True)) - fig.solar( - terminator="d", - pen="1p,blue", - terminator_datetime="1990-02-17 04:25:00", - ) - fig.solar( - terminator="a", - pen="1p,red", - terminator_datetime="1990-02-17 04:25:00", - ) - fig.solar( - terminator="c", - pen="1p,green", - terminator_datetime="1990-02-17 04:25:00", - ) - fig.solar( - terminator="n", - pen="1p,yellow", - terminator_datetime="1990-02-17 04:25:00", - ) + fig.solar(terminator="day_night", pen="1p,blue", terminator_datetime=dt) + fig.solar(terminator="astronomical", pen="1p,red", terminator_datetime=dt) + fig.solar(terminator="civil", pen="1p,green", terminator_datetime=dt) + fig.solar(terminator="nautical", pen="1p,yellow", terminator_datetime=dt) return fig