@@ -57,6 +57,7 @@ def test_coast_aliases():
57
57
Y = "a10c" ,
58
58
p = "135/25" ,
59
59
t = 13 ,
60
+ E = "MA+gred" ,
60
61
C = "blue" ,
61
62
)
62
63
fig_test .coast (
@@ -75,6 +76,7 @@ def test_coast_aliases():
75
76
yshift = "a10c" , # Y
76
77
perspective = [135 , 25 ], # p
77
78
transparency = 13 , # t
79
+ dcw = "MA+gred" , # E
78
80
lakes = "blue" , # C
79
81
)
80
82
return fig_ref , fig_test
@@ -93,3 +95,91 @@ def test_coast_world_mercator():
93
95
water = "white" ,
94
96
)
95
97
return fig
98
+
99
+
100
+ @check_figures_equal ()
101
+ def test_coast_dcw_single ():
102
+ "Test passing a single country code to dcw"
103
+ fig_ref , fig_test = Figure (), Figure ()
104
+ # Use single-character arguments for the reference image
105
+ fig_ref .coast (R = "-10/15/25/44" , J = "M15c" , B = "a" , G = "brown" , E = "ES+gbisque+pblue" )
106
+ fig_test .coast (
107
+ region = [- 10 , 15 , 25 , 44 ],
108
+ frame = "a" ,
109
+ projection = "M15c" ,
110
+ land = "brown" ,
111
+ dcw = "ES+gbisque+pblue" ,
112
+ )
113
+ return fig_ref , fig_test
114
+
115
+
116
+ @check_figures_equal ()
117
+ def test_coast_dcw_multiple ():
118
+ "Test passing multiple country code to dcw"
119
+ fig_ref , fig_test = Figure (), Figure ()
120
+ # Use single-character arguments for the reference image
121
+ fig_ref .coast (R = "-10/15/25/44" , J = "M15c" , B = "a" , G = "brown" , E = "ES,IT+gbisque+pblue" )
122
+ fig_test .coast (
123
+ region = [- 10 , 15 , 25 , 44 ],
124
+ frame = "a" ,
125
+ projection = "M15c" ,
126
+ land = "brown" ,
127
+ dcw = "ES,IT+gbisque+pblue" ,
128
+ )
129
+ return fig_ref , fig_test
130
+
131
+
132
+ @check_figures_equal ()
133
+ def test_coast_dcw_list ():
134
+ "Test passing a list of country codes and fill options to dcw"
135
+ fig_ref , fig_test = Figure (), Figure ()
136
+ # Use single-character arguments for the reference image
137
+ fig_ref .coast (
138
+ R = "-10/15/25/44" ,
139
+ J = "M15c" ,
140
+ B = "a" ,
141
+ G = "brown" ,
142
+ E = ["ES+gbisque+pgreen" , "IT+gcyan+pblue" ],
143
+ )
144
+ fig_test .coast (
145
+ region = [- 10 , 15 , 25 , 44 ],
146
+ frame = "a" ,
147
+ projection = "M15c" ,
148
+ land = "brown" ,
149
+ dcw = ["ES+gbisque+pgreen" , "IT+gcyan+pblue" ],
150
+ )
151
+ return fig_ref , fig_test
152
+
153
+
154
+ @check_figures_equal ()
155
+ def test_coast_dcw_continent ():
156
+ "Test passing a continent code to dcw"
157
+ fig_ref , fig_test = Figure (), Figure ()
158
+ # Use single-character arguments for the reference image
159
+ fig_ref .coast (R = "-10/15/25/44" , J = "M15c" , B = "a" , G = "brown" , E = "=AF+gbisque+pblue" )
160
+ fig_test .coast (
161
+ region = [- 10 , 15 , 25 , 44 ],
162
+ frame = "a" ,
163
+ projection = "M15c" ,
164
+ land = "brown" ,
165
+ dcw = "=AF+gbisque+pblue" ,
166
+ )
167
+ return fig_ref , fig_test
168
+
169
+
170
+ @check_figures_equal ()
171
+ def test_coast_dcw_state ():
172
+ "Test passing a US state code to dcw"
173
+ fig_ref , fig_test = Figure (), Figure ()
174
+ # Use single-character arguments for the reference image
175
+ fig_ref .coast (
176
+ R = "-75/-69/40/44" , J = "M15c" , B = "a" , G = "brown" , E = "US.MA+gbisque+pblue"
177
+ )
178
+ fig_test .coast (
179
+ region = [- 75 , - 69 , 40 , 44 ],
180
+ frame = "a" ,
181
+ projection = "M15c" ,
182
+ land = "brown" ,
183
+ dcw = "US.MA+gbisque+pblue" ,
184
+ )
185
+ return fig_ref , fig_test
0 commit comments