File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 5
5
6
6
import pytest
7
7
import xarray as xr
8
- from pygmt import which
8
+ from packaging .version import Version
9
+ from pygmt import clib , which
9
10
from pygmt .exceptions import GMTInvalidInput
10
11
12
+ with clib .Session () as _lib :
13
+ gmt_version = Version (_lib .info ["version" ])
14
+
11
15
12
16
def test_accessor_gridline_cartesian ():
13
17
"""
@@ -70,6 +74,10 @@ def test_accessor_set_non_boolean():
70
74
grid .gmt .gtype = 2
71
75
72
76
77
+ @pytest .mark .skipif (
78
+ gmt_version < Version ("6.4.0" ),
79
+ reason = "Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/6615" ,
80
+ )
73
81
def test_accessor_sliced_datacube ():
74
82
"""
75
83
Check that a 2D grid which is sliced from an n-dimensional datacube works
@@ -87,6 +95,6 @@ def test_accessor_sliced_datacube():
87
95
grid = dataset .sel (level = 500 , month = 1 , drop = True ).z
88
96
89
97
assert grid .gmt .registration == 0 # gridline registration
90
- assert grid .gmt .gtype == 0 # cartesian coordinate type
98
+ assert grid .gmt .gtype == 1 # geographic coordinate type
91
99
finally :
92
100
os .remove (fname )
You can’t perform that action at this time.
0 commit comments