Skip to content

Commit

Permalink
Expand existing tests to test int type colors
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Oct 4, 2021
1 parent f2ad5e5 commit 5bc6a4c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions pygmt/tests/test_plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,12 +302,13 @@ def test_plot_sizes_colors_transparencies():
return fig


@pytest.mark.mpl_image_compare
@pytest.mark.mpl_image_compare(filename="test_plot_matrix.png")
@pytest.mark.parametrize("color", ["#aaaaaa", 170])
@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):
def test_plot_matrix(data, color):
"""
Plot the data passing in a matrix and specifying columns.
"""
Expand All @@ -317,7 +318,7 @@ def test_plot_matrix(data):
region=[10, 70, -5, 10],
projection="M15c",
style="cc",
color="#aaaaaa",
color=color,
frame="a",
incols="0,1,2+s0.5",
)
Expand Down
6 changes: 4 additions & 2 deletions pygmt/tests/test_plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,9 @@ def test_plot3d_sizes_colors_transparencies():


@pytest.mark.mpl_image_compare
def test_plot3d_matrix(data, region):
@pytest.mark.mpl_image_compare(filename="test_plot3d_matrix.png")
@pytest.mark.parametrize("color", ["#aaaaaa", 170])
def test_plot3d_matrix(data, region, color):
"""
Plot the data passing in a matrix and specifying incols.
"""
Expand All @@ -325,7 +327,7 @@ def test_plot3d_matrix(data, region):
region=region,
projection="M20c",
style="c1c",
color="#aaaaaa",
color=color,
frame=["a", "za"],
incols="0,1,2",
)
Expand Down

0 comments on commit 5bc6a4c

Please sign in to comment.