-
Notifications
You must be signed in to change notification settings - Fork 229
Update test_coast_aliases #769
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
Update test_coast_aliases #769
Conversation
…ange test type to use @check_figures_equal
Following #771 (comment), I think we don't want the changes in this PR. Am I right? |
@seisman Sorry if my poor timing of submitting this pull request and #771 at the same time made this confusing. In my opinion, I think the changes in this PR are valid. I'll admit that I'm not too experienced with writing tests, but I think one of the minimum standards for PyGMT tests should be including a test that makes sure all of the aliases are successfully passed to the GMT API. My thought process here is this ensures that any changes in the GMT argument names, or any accidental changes to the PyGMT aliases, are caught. The test already existed, but my assumption is that |
pygmt/tests/test_coast.py
Outdated
S="skyblue", | ||
D="i", | ||
A=1000, | ||
L="jMM+c1+w1000k+f+l", |
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.
MM
is not a valid anchor. Do you mean CM
?
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.
@seisman I did mean CM
, and changed it in my most recent commit. I don't know enough about how GMT handles a different input, but it looks like MM
is a valid anchor; both argument variations look the same on the figure. I ran a @check_figures_equal
test for the two and it passed.
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.
I guess that GMT may default to "CM" if the given anchor can not be recognized.
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.
The test looks OK, but it's a bad idea to use -Vq which disables warnings and errors.
Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
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.
@willschlitzer The test looks good to me.
As you're now a member of the python-maintainers team, you should be able to merge the PR when the CI tests finish. Please try it.
It's OK if one or two Windows CI tests fail. That's a known issue (#758) and we don't have a solution yet .
@seisman sounds good! |
@willschlitzer It's problematic to use Edit: Fixed at #785. |
Fixes the bug introduced in #769.
* Update test_coast_aliases() for all included aliases in v0.2.1 and change test type to use @check_figures_equal * Updating map scale anchor in alias test of test_coast.py * Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian <[email protected]> * Update pygmt/tests/test_coast.py Co-authored-by: Dongdong Tian <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
Fixes the bug introduced in GenericMappingTools#769.
The current
test_coast_aliases()
intest_coast.py
does not include all of the current aliases in PyGMT v0.2.1; I updated the function to include all of the aliases and changed the test format to use@check_figures_equal
.