Skip to content

Commit 1eb6dec

Browse files
authored
Tests: Suppress warnings by explicitly setting output_type to 'file' (#3135)
1 parent 32e3cb3 commit 1eb6dec

File tree

5 files changed

+7
-1
lines changed

5 files changed

+7
-1
lines changed

pygmt/tests/test_blockm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def test_blockmean_input_filename():
8282
data="@tut_ship.xyz",
8383
spacing="5m",
8484
region=[245, 255, 20, 30],
85+
output_type="file",
8586
outfile=tmpfile.name,
8687
)
8788
assert output is None # check that output is None since outfile is set

pygmt/tests/test_blockmedian.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def test_blockmedian_input_filename():
7979
data="@tut_ship.xyz",
8080
spacing="5m",
8181
region=[245, 255, 20, 30],
82+
output_type="file",
8283
outfile=tmpfile.name,
8384
)
8485
assert output is None # check that output is None since outfile is set

pygmt/tests/test_grdtrack.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ def test_grdtrack_input_csvfile_and_dataarray(dataarray, expected_array):
7070
Run grdtrack by passing in a csvfile and xarray.DataArray as inputs.
7171
"""
7272
with GMTTempFile() as tmpfile:
73-
output = grdtrack(points=POINTS_DATA, grid=dataarray, outfile=tmpfile.name)
73+
output = grdtrack(
74+
points=POINTS_DATA, grid=dataarray, output_type="file", outfile=tmpfile.name
75+
)
7476
assert output is None # check that output is None since outfile is set
7577
assert Path(tmpfile.name).stat().st_size > 0 # check that outfile exists
7678
output = np.loadtxt(tmpfile.name)

pygmt/tests/test_project.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def test_project_output_filename(dataframe):
6262
center=[0, -1],
6363
azimuth=45,
6464
flat_earth=True,
65+
output_type="file",
6566
outfile=tmpfile.name,
6667
)
6768
assert output is None # check that output is None since outfile is set

pygmt/tests/test_select.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ def test_select_input_filename():
5656
data="@tut_ship.xyz",
5757
region=[250, 251, 26, 27],
5858
z_subregion=["-/-630", "-120/0+a"],
59+
output_type="file",
5960
outfile=tmpfile.name,
6061
)
6162
assert output is None # check that output is None since outfile is set

0 commit comments

Comments
 (0)