1212import numpy .testing as npt
1313import pandas as pd
1414import pytest
15- from packaging .version import Version
1615from pygmt import config , x2sys_cross , x2sys_init
17- from pygmt .clib import __gmt_version__
1816from pygmt .datasets import load_sample_data
1917from pygmt .exceptions import GMTTypeError
2018
@@ -38,12 +36,7 @@ def fixture_tracks():
3836 return [dataframe .query (expr = "z > -20" )] # reduce size of dataset
3937
4038
41- # TODO(GMT>=6.5.0): Remove the xfail marker for the upstream bug fixed in GMT 6.5.0.
4239@pytest .mark .usefixtures ("mock_x2sys_home" )
43- @pytest .mark .xfail (
44- condition = Version (__gmt_version__ ) < Version ("6.5.0" ),
45- reason = "Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188" ,
46- )
4740def test_x2sys_cross_input_file_output_file ():
4841 """
4942 Run x2sys_cross by passing in a filename, and output internal crossovers to an ASCII
@@ -68,12 +61,7 @@ def test_x2sys_cross_input_file_output_file():
6861 npt .assert_allclose (result ["i_1" ].max (), 82945.9370 , rtol = 1.0e-4 )
6962
7063
71- # TODO(GMT>=6.5.0): Remove the xfail marker for the upstream bug fixed in GMT 6.5.0.
7264@pytest .mark .usefixtures ("mock_x2sys_home" )
73- @pytest .mark .xfail (
74- condition = Version (__gmt_version__ ) < Version ("6.5.0" ),
75- reason = "Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188" ,
76- )
7765def test_x2sys_cross_input_file_output_dataframe ():
7866 """
7967 Run x2sys_cross by passing in a filename, and output internal crossovers to a
@@ -247,12 +235,7 @@ def test_x2sys_cross_invalid_tracks_input_type(tracks):
247235 x2sys_cross (tracks = [invalid_tracks ])
248236
249237
250- # TODO(GMT>=6.5.0): Remove the xfail marker for the upstream bug fixed in GMT 6.5.0.
251238@pytest .mark .usefixtures ("mock_x2sys_home" )
252- @pytest .mark .xfail (
253- condition = Version (__gmt_version__ ) < Version ("6.5.0" ),
254- reason = "Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188" ,
255- )
256239def test_x2sys_cross_region_interpolation_numpoints ():
257240 """
258241 Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments
@@ -283,12 +266,7 @@ def test_x2sys_cross_region_interpolation_numpoints():
283266 npt .assert_allclose (output .z_M .mean (), - 2896.875915 , rtol = 1e-4 )
284267
285268
286- # TODO(GMT>=6.5.0): Remove the xfail marker for the upstream bug fixed in GMT 6.5.0.
287269@pytest .mark .usefixtures ("mock_x2sys_home" )
288- @pytest .mark .xfail (
289- condition = Version (__gmt_version__ ) < Version ("6.5.0" ),
290- reason = "Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188" ,
291- )
292270def test_x2sys_cross_trackvalues ():
293271 """
294272 Test that x2sys_cross's trackvalues (Z) argument work.
0 commit comments