File tree 3 files changed +6
-16
lines changed
3 files changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -161,13 +161,8 @@ def test_call_module_error_message():
161
161
try :
162
162
lib .call_module ("info" , "bogus-data.bla" )
163
163
except GMTCLibError as error :
164
- msg = "\n " .join (
165
- [
166
- "Module 'info' failed with status code 71:" ,
167
- "gmtinfo [ERROR]: Cannot find file bogus-data.bla" ,
168
- ]
169
- )
170
- assert str (error ) == msg
164
+ assert "Module 'info' failed with status code" in str (error )
165
+ assert "gmtinfo [ERROR]: Cannot find file bogus-data.bla" in str (error )
171
166
172
167
173
168
def test_method_no_session ():
Original file line number Diff line number Diff line change 1
1
"""
2
2
Test Figure.grdimage
3
3
"""
4
+ import sys
4
5
import numpy as np
5
6
import pytest
6
7
import xarray as xr
@@ -73,9 +74,9 @@ def test_grdimage_file():
73
74
return fig
74
75
75
76
76
- @pytest .mark .xfail (
77
+ @pytest .mark .skip (
77
78
reason = "Upstream bug in GMT 6.1.1" ,
78
- condition = gmt_version <= Version ("6.1.1" ),
79
+ condition = gmt_version <= Version ("6.1.1" ) and sys . platform == "darwin" ,
79
80
)
80
81
@check_figures_equal ()
81
82
@pytest .mark .parametrize (
Original file line number Diff line number Diff line change 8
8
import pandas as pd
9
9
import pytest
10
10
import xarray as xr
11
- from packaging .version import Version
12
11
13
- from .. import clib , info
12
+ from .. import info
14
13
from ..exceptions import GMTInvalidInput
15
14
16
15
TEST_DATA_DIR = os .path .join (os .path .dirname (__file__ ), "data" )
17
16
POINTS_DATA = os .path .join (TEST_DATA_DIR , "points.txt" )
18
17
19
- with clib .Session () as _lib :
20
- gmt_version = Version (_lib .info ["version" ])
21
-
22
18
23
19
def test_info ():
24
20
"Make sure info works on file name inputs"
@@ -43,7 +39,6 @@ def test_info_dataframe():
43
39
44
40
45
41
@pytest .mark .xfail (
46
- condition = gmt_version <= Version ("6.1.1" ),
47
42
reason = "UNIX timestamps returned instead of ISO datetime, should work on GMT 6.2.0 "
48
43
"after https://github.com/GenericMappingTools/gmt/issues/4241 is resolved" ,
49
44
)
@@ -63,7 +58,6 @@ def test_info_pandas_dataframe_time_column():
63
58
64
59
65
60
@pytest .mark .xfail (
66
- condition = gmt_version <= Version ("6.1.1" ),
67
61
reason = "UNIX timestamp returned instead of ISO datetime, should work on GMT 6.2.0 "
68
62
"after https://github.com/GenericMappingTools/gmt/issues/4241 is resolved" ,
69
63
)
You can’t perform that action at this time.
0 commit comments