Skip to content

Commit 4a2a002

Browse files
Merge branch 'master' into earth-relief-invalid-resolution-registration
2 parents dd9f0d0 + 8b42490 commit 4a2a002

File tree

5 files changed

+17
-18
lines changed

5 files changed

+17
-18
lines changed
-26.2 KB
Binary file not shown.
Binary file not shown.
-29.3 KB
Binary file not shown.

pygmt/tests/test_basemap.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,15 @@ def test_basemap_polar():
7777
return fig_ref, fig_test
7878

7979

80-
@pytest.mark.mpl_image_compare
80+
@check_figures_equal()
8181
def test_basemap_winkel_tripel():
8282
"""
8383
Create a Winkel Tripel basemap plot.
8484
"""
85-
fig = Figure()
86-
fig.basemap(R="90/450/-90/90", J="R270/25c", B="afg")
87-
return fig
88-
89-
90-
@pytest.mark.mpl_image_compare
91-
def test_basemap_aliases():
92-
"""
93-
Make sure the argument aliases work.
94-
"""
95-
fig = Figure()
96-
fig.basemap(region=[0, 360, -90, 90], projection="W7i", frame=True)
97-
return fig
85+
fig_ref, fig_test = Figure(), Figure()
86+
fig_ref.basemap(R="90/450/-90/90", J="R270/25c", B="afg")
87+
fig_test.basemap(region=[90, 450, -90, 90], projection="R270/25c", frame="afg")
88+
return fig_ref, fig_test
9889

9990

10091
@check_figures_equal()

pygmt/tests/test_plot.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,21 @@ def test_plot_fail_size_color(data):
119119
)
120120

121121

122-
@pytest.mark.mpl_image_compare
122+
@check_figures_equal()
123123
def test_plot_projection(data):
124124
"""
125125
Plot the data in green squares with a projection.
126126
"""
127-
fig = Figure()
128-
fig.plot(
127+
fig_ref, fig_test = Figure(), Figure()
128+
fig_ref.plot(
129+
data=POINTS_DATA,
130+
R="g",
131+
J="R270/4i",
132+
S="s0.2c",
133+
G="green",
134+
B="ag",
135+
)
136+
fig_test.plot(
129137
x=data[:, 0],
130138
y=data[:, 1],
131139
region="g",
@@ -134,7 +142,7 @@ def test_plot_projection(data):
134142
color="green",
135143
frame="ag",
136144
)
137-
return fig
145+
return fig_ref, fig_test
138146

139147

140148
@check_figures_equal()

0 commit comments

Comments
 (0)