From f7d16e4b902aaa6dc765e028e60fbc2f974cb478 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 29 Sep 2021 15:50:29 +0800 Subject: [PATCH] Update the baseline image for pygmt/test/test_plot.py:test_plot_matrix --- pygmt/tests/baseline/test_plot_matrix.png.dvc | 4 ++-- pygmt/tests/test_plot.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pygmt/tests/baseline/test_plot_matrix.png.dvc b/pygmt/tests/baseline/test_plot_matrix.png.dvc index b54d3b25515..c72df46638b 100644 --- a/pygmt/tests/baseline/test_plot_matrix.png.dvc +++ b/pygmt/tests/baseline/test_plot_matrix.png.dvc @@ -1,4 +1,4 @@ outs: -- md5: 41e2e88122f0a2036943ec8017ac0f4f - size: 17139 +- md5: 868f554737ce7b116b50e68ea32b6331 + size: 13639 path: test_plot_matrix.png diff --git a/pygmt/tests/test_plot.py b/pygmt/tests/test_plot.py index 0cca5fd9bae..dc6829b9ecf 100644 --- a/pygmt/tests/test_plot.py +++ b/pygmt/tests/test_plot.py @@ -9,13 +9,17 @@ import pandas as pd import pytest import xarray as xr -from pygmt import Figure +from packaging.version import Version +from pygmt import Figure, clib from pygmt.exceptions import GMTInvalidInput from pygmt.helpers import GMTTempFile TEST_DATA_DIR = os.path.join(os.path.dirname(__file__), "data") POINTS_DATA = os.path.join(TEST_DATA_DIR, "points.txt") +with clib.Session() as _lib: + gmt_version = Version(_lib.info["version"]) + @pytest.fixture(scope="module") def data(): @@ -299,6 +303,10 @@ def test_plot_sizes_colors_transparencies(): @pytest.mark.mpl_image_compare +@pytest.mark.xfail( + condition=gmt_version <= Version("6.2.0"), + reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/5799.", +) def test_plot_matrix(data): """ Plot the data passing in a matrix and specifying columns. @@ -311,7 +319,7 @@ def test_plot_matrix(data): style="cc", color="#aaaaaa", frame="a", - incols="0,1,2+s0.005", + incols="0,1,2+s0.5", ) return fig