Skip to content

Commit 5fa9bfe

Browse files
authored
Migrate Figure.subplot tests to dvc
Related to #1131.
1 parent c05c975 commit 5fa9bfe

File tree

1 file changed

+9
-13
lines changed

1 file changed

+9
-13
lines changed

pygmt/tests/test_subplot.py

+9-13
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,20 @@
77
from pygmt.helpers.testing import check_figures_equal
88

99

10-
@check_figures_equal()
10+
@pytest.mark.mpl_image_compare
1111
def test_subplot_basic_frame():
1212
"""
1313
Create a subplot figure with 1 vertical row and 2 horizontal columns, and
1414
ensure map frame setting is applied to all subplot figures.
1515
"""
16-
fig_ref, fig_test = Figure(), Figure()
17-
with fig_ref.subplot(nrows=1, ncols=2, Ff="6c/3c", B="WSne"):
18-
with fig_ref.set_panel(panel=0):
19-
fig_ref.basemap(region=[0, 3, 0, 3], frame="+tplot0")
20-
with fig_ref.set_panel(panel=1):
21-
fig_ref.basemap(region=[0, 3, 0, 3], frame="+tplot1")
22-
with fig_test.subplot(nrows=1, ncols=2, figsize=("6c", "3c"), frame="WSne"):
23-
with fig_test.set_panel(panel="0,0"):
24-
fig_test.basemap(region=[0, 3, 0, 3], frame="+tplot0")
25-
with fig_test.set_panel(panel=[0, 1]):
26-
fig_test.basemap(region=[0, 3, 0, 3], frame="+tplot1")
27-
return fig_ref, fig_test
16+
fig = Figure()
17+
18+
with fig.subplot(nrows=1, ncols=2, figsize=("6c", "3c"), frame="WSne"):
19+
with fig.set_panel(panel="0,0"):
20+
fig.basemap(region=[0, 3, 0, 3], frame="+tplot0")
21+
with fig.set_panel(panel=[0, 1]):
22+
fig.basemap(region=[0, 3, 0, 3], frame="+tplot1")
23+
return fig
2824

2925

3026
@check_figures_equal()

0 commit comments

Comments
 (0)