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 3aaccd9 commit 7635778
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 @@ -298,8 +298,9 @@ def test_plot_sizes_colors_transparencies():
return fig


@pytest.mark.mpl_image_compare
def test_plot_matrix(data):
@pytest.mark.mpl_image_compare(filename="test_plot_matrix.png")
@pytest.mark.parametrize("color", ["#aaaaaa", 170])
def test_plot_matrix(data, color):
"""
Plot the data passing in a matrix and specifying columns.
"""
Expand All @@ -309,7 +310,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.005",
)
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 7635778

Please sign in to comment.