-
Notifications
You must be signed in to change notification settings - Fork 229
Fix failing tests for legacy GMT versions #3021
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
8330848
Temporarily enable GMT Legacy Tests in PR
seisman efda35c
test_load_remote_dataset_benchmark_with_region: cpt is not available …
seisman ab7d7fc
Fix x2sys_cross failures
seisman 469b98d
Fix more x2sys_cross failures
seisman a7940a6
Merge branch 'main' into legacy
seisman e58c671
Revert "Fix more x2sys_cross failures"
seisman 9ee5ebe
Revert "Fix x2sys_cross failures"
seisman 0c3bbe2
Mark x2sys_cross tests as xfail for GMT<6.5.0
seisman c35c69c
Mark test_earth_relief_03s_default_registration as xfail for GMT>=6.5.0
seisman 62886bc
Update pygmt/tests/test_datasets_load_remote_datasets.py
seisman b11ffac
[skip ci] Update .github/workflows/ci_tests_legacy.yaml
seisman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,9 @@ | |
import numpy.testing as npt | ||
import pandas as pd | ||
import pytest | ||
from packaging.version import Version | ||
from pygmt import x2sys_cross, x2sys_init | ||
from pygmt.clib import __gmt_version__ | ||
from pygmt.datasets import load_sample_data | ||
from pygmt.exceptions import GMTInvalidInput | ||
from pygmt.helpers import data_kind | ||
|
@@ -55,6 +57,10 @@ def test_x2sys_cross_input_file_output_file(): | |
|
||
|
||
@pytest.mark.usefixtures("mock_x2sys_home") | ||
@pytest.mark.xfail( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See comment #2986 (comment). |
||
condition=Version(__gmt_version__) < Version("6.5.0"), | ||
reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188", | ||
) | ||
def test_x2sys_cross_input_file_output_dataframe(): | ||
""" | ||
Run x2sys_cross by passing in a filename, and output internal crossovers to a | ||
|
@@ -196,6 +202,10 @@ def test_x2sys_cross_invalid_tracks_input_type(tracks): | |
|
||
|
||
@pytest.mark.usefixtures("mock_x2sys_home") | ||
@pytest.mark.xfail( | ||
condition=Version(__gmt_version__) < Version("6.5.0"), | ||
reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188", | ||
) | ||
def test_x2sys_cross_region_interpolation_numpoints(): | ||
""" | ||
Test that x2sys_cross's region (R), interpolation (l) and numpoints (W) arguments | ||
|
@@ -221,6 +231,10 @@ def test_x2sys_cross_region_interpolation_numpoints(): | |
|
||
|
||
@pytest.mark.usefixtures("mock_x2sys_home") | ||
@pytest.mark.xfail( | ||
condition=Version(__gmt_version__) < Version("6.5.0"), | ||
reason="Upstream bug fixed in https://github.com/GenericMappingTools/gmt/pull/8188", | ||
) | ||
def test_x2sys_cross_trackvalues(): | ||
""" | ||
Test that x2sys_cross's trackvalues (Z) argument work. | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As reported in #2511, there must be some bugs in GMT 6.5.0, so mark the test as xfail for GMT>=6.5.0.