Skip to content

Commit b9ca682

Browse files
authored
Fix a failing test due to GMT API change (#556)
The test `test_put_matrix_grid` fails due to recent changes of GMT API in GenericMappingTools/gmt#3848. Before this PR, for a matrix grid, calling GMT_Write_Data always writes the matrix grid as a matrix, no matter the geometry is `GMT_IS_POINT` or `GMT_IS_SURFACE`. This PR declares it as a bug (or an improvement). With that PR merged, `geometry=GMT_IS_POINT` writes a matrix, `geometry=GMT_IS_SURFACE` writes a the matrix grid as a netCDF file. This test expects a matrix, but the new API writes a netCDF grid. That's why it fails. This PR fixes the issue by simply changing `GMT_IS_SURFACE` to `GMT_IS_POINT`, so that the test can pass for GMT 6.1.0, 6.1 and master branches.
1 parent 3b306c6 commit b9ca682

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pygmt/tests/test_clib_put_matrix.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_put_matrix_grid():
7676
with GMTTempFile() as tmp_file:
7777
lib.write_data(
7878
"GMT_IS_MATRIX",
79-
"GMT_IS_SURFACE",
79+
"GMT_IS_POINT",
8080
"GMT_CONTAINER_AND_DATA",
8181
wesn,
8282
tmp_file.name,

0 commit comments

Comments
 (0)