Skip to content

Commit 6ef9512

Browse files
authored
Migrate test_figure_shift_origin to dvc (#1133)
1 parent c280711 commit 6ef9512

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
outs:
2+
- md5: 07df92baab0051531f6c8023f4108332
3+
size: 9876
4+
path: test_figure_shift_origin.png
-67.5 KB
Binary file not shown.

pygmt/tests/test_figure.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,21 +147,22 @@ def test_figure_show():
147147

148148

149149
@pytest.mark.mpl_image_compare
150-
def test_shift_origin():
150+
def test_figure_shift_origin():
151151
"""
152152
Test if fig.shift_origin works.
153153
"""
154+
kwargs = dict(region=[0, 3, 0, 5], projection="X3c/5c", frame=0)
154155
fig = Figure()
155156
# First call shift_origin without projection and region.
156-
# Test the issue https://github.com/GenericMappingTools/pygmt/issues/514
157-
fig.shift_origin(xshift="2i", yshift="3i")
158-
fig.basemap(region="10/70/-300/300", projection="X3i/5i", frame="af")
159-
fig.shift_origin(xshift="4i")
160-
fig.basemap(region="10/70/-300/300", projection="X3i/5i", frame="af")
161-
fig.shift_origin(yshift="6i")
162-
fig.basemap(region="10/70/-300/300", projection="X3i/5i", frame="af")
163-
fig.shift_origin(xshift="-4i", yshift="6i")
164-
fig.basemap(region="10/70/-300/300", projection="X3i/5i", frame="af")
157+
# Test issue https://github.com/GenericMappingTools/pygmt/issues/514
158+
fig.shift_origin(xshift="2c", yshift="3c")
159+
fig.basemap(**kwargs)
160+
fig.shift_origin(xshift="4c")
161+
fig.basemap(**kwargs)
162+
fig.shift_origin(yshift="6c")
163+
fig.basemap(**kwargs)
164+
fig.shift_origin(xshift="-4c", yshift="6c")
165+
fig.basemap(**kwargs)
165166
return fig
166167

167168

0 commit comments

Comments
 (0)