Skip to content

Commit 478cc7a

Browse files
Update test_coast_aliases (#769)
* Update test_coast_aliases() for all included aliases in v0.2.1 and change test type to use @check_figures_equal * Updating map scale anchor in alias test of test_coast.py * Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian <[email protected]> * Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
1 parent 999a3f3 commit 478cc7a

File tree

1 file changed

+38
-14
lines changed

1 file changed

+38
-14
lines changed

pygmt/tests/test_coast.py

+38-14
Original file line numberDiff line numberDiff line change
@@ -37,23 +37,47 @@ def test_coast_iceland():
3737
return fig_ref, fig_test
3838

3939

40-
@pytest.mark.mpl_image_compare
40+
@check_figures_equal()
4141
def test_coast_aliases():
4242
"Test that all aliases work"
43-
fig = Figure()
44-
fig.coast(
45-
region="-30/30/-40/40",
46-
projection="m0.1i",
47-
frame="afg",
48-
rivers="1/1p,black",
49-
borders="1/0.5p,-",
50-
shorelines="0.25p,white",
51-
land="moccasin",
52-
water="skyblue",
53-
resolution="i",
54-
area_thresh=1000,
43+
fig_ref, fig_test = Figure(), Figure()
44+
fig_ref.coast(
45+
R="-30/30/-40/40",
46+
J="M25c",
47+
B="afg",
48+
I="1/1p,black",
49+
N="1/0.5p,-",
50+
W="0.25p,white",
51+
G="moccasin",
52+
S="skyblue",
53+
D="i",
54+
A=1000,
55+
L="jCM+c1+w1000k+f+l",
56+
U=True,
57+
X="a4c",
58+
Y="a10c",
59+
p="135/25",
60+
t=13,
5561
)
56-
return fig
62+
fig_test.coast(
63+
region=[-30, 30, -40, 40], # R
64+
projection="M25c", # J
65+
frame="afg", # B
66+
rivers="1/1p,black", # I
67+
borders="1/0.5p,-", # N
68+
shorelines="0.25p,white", # W
69+
land="moccasin", # G
70+
water="skyblue", # S
71+
resolution="i", # D
72+
area_thresh=1000, # A
73+
map_scale="jCM+c1+w1000k+f+l", # L
74+
timestamp=True, # U
75+
xshift="a4c", # X
76+
yshift="a10c", # Y
77+
perspective=[135, 25], # p
78+
transparency=13, # t
79+
)
80+
return fig_ref, fig_test
5781

5882

5983
@pytest.mark.mpl_image_compare

0 commit comments

Comments
 (0)