Skip to content

Commit ac26993

Browse files
committed
Refactor test to use new check_figures_equal syntax from #590
1 parent f16213c commit ac26993

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pygmt/tests/test_grdview.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@ def fixture_grid(region):
2525

2626

2727
@check_figures_equal()
28-
def test_grdview_grid_dataarray(grid, region, fig_ref, fig_test):
28+
def test_grdview_grid_dataarray(grid, region):
2929
"""
3030
Run grdview by passing in a grid as an xarray.DataArray.
3131
"""
32+
fig_ref = Figure()
3233
fig_ref.grdview(grid="@earth_relief_01d_g", region=region)
34+
fig_test = Figure()
3335
fig_test.grdview(grid=grid)
36+
return fig_ref, fig_test
3437

3538

3639
@pytest.mark.mpl_image_compare
@@ -58,14 +61,17 @@ def test_grdview_wrong_kind_of_grid(grid):
5861

5962

6063
@check_figures_equal()
61-
def test_grdview_with_perspective(grid, region, fig_ref, fig_test):
64+
def test_grdview_with_perspective(grid, region):
6265
"""
6366
Run grdview by passing in a grid and setting a perspective viewpoint with
6467
an azimuth from the SouthEast and an elevation angle 15 degrees from the
6568
z-plane.
6669
"""
70+
fig_ref = Figure()
6771
fig_ref.grdview(grid="@earth_relief_01d_g", region=region, perspective=[135, 15])
72+
fig_test = Figure()
6873
fig_test.grdview(grid=grid, perspective=[135, 15])
74+
return fig_ref, fig_test
6975

7076

7177
@pytest.mark.xfail(

0 commit comments

Comments
 (0)