Skip to content
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

More scipy/pykdtree test wrangling #2

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

rcomer
Copy link

@rcomer rcomer commented Dec 2, 2023

Rationale

Hi @greglucas, here is a review for SciTools#2282 in PR form! I found a few tests in these modules can still pass without scipy or pykdtree, so I think it makes sense to move the skip down to the function level. By the time I figured out how it could work it seemed easiest to push my own branch.

Apart from a tiny conflict where the ruff change moved an import, the rest looks good to me.

Implications

@@ -49,6 +47,7 @@ def test_natural_earth_custom():
return ax.figure


@pytest.mark.skipif(not _HAS_PYKDTREE_OR_SCIPY, reason='pykdtree or scipy is required')
Copy link
Author

@rcomer rcomer Dec 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This skip would be unnecessary if the test didn't use stock_img, which I don't think the test really needs. However I'm not sure it's worth replacing the test's reference image for the purpose of this exercise.

@greglucas greglucas merged commit 90dbe6c into greglucas:tst-skip-scipy Dec 2, 2023
@greglucas
Copy link
Owner

Thanks @rcomer! I definitely just took the heavy handed approach without worrying too much about whether tests were able to be run or not. But, this is nicer.

@rcomer rcomer deleted the tst-scipy-pykdtree branch December 2, 2023 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants