Repository navigation
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 |
| S="skyblue", | ||
| D="i", | ||
| A=1000, | ||
| L="jMM+c1+w1000k+f+l", |
There was a problem hiding this comment.
MM is not a valid anchor. Do you mean CM?
There was a problem hiding this comment.
@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.
I guess that GMT may default to "CM" if the given anchor can not be recognized.
seisman
left a comment
There was a problem hiding this comment.
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]>
seisman
left a comment
There was a problem hiding this comment.
@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.pydoes 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.