Skip to content

Commit 0509f02

Browse files
committed
add test_grdvolume_no_outfile
1 parent d7c98cd commit 0509f02

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pygmt/tests/test_grdvolume.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,15 @@ def test_grdvolume_invalid_format(grid):
8383
grdvolume(grid=grid, output_type=1)
8484

8585

86+
def test_grdvolume_no_outfile(grid):
87+
"""
88+
Test that grdvolume fails when output_type set to 'file' but no outfile is
89+
specified.
90+
"""
91+
with pytest.raises(GMTInvalidInput):
92+
grdvolume(grid=grid, output_type="file")
93+
94+
8695
def test_grdvolume_no_outgrid(grid, data):
8796
"""
8897
Test the expected output of grdvolume with no output file set.

0 commit comments

Comments
 (0)