Test skipping based on module (esp. healpix) availability#944
Open
sadielbartholomew wants to merge 10 commits into
Open
Test skipping based on module (esp. healpix) availability#944sadielbartholomew wants to merge 10 commits into
healpix) availability#944sadielbartholomew wants to merge 10 commits into
Conversation
Member
Author
|
@davidhassell just a reminder as per our meeting today that it would be great to get this reviewed and merged when you have a change to look. Thanks. |
davidhassell
requested changes
May 30, 2026
Collaborator
davidhassell
left a comment
There was a problem hiding this comment.
Hi Sadie,
I find that the setup variables are not available to the test methods ... is that what you get?
>>python test_HEALPix_utils.py
Run date: 2026-05-30 12:00:00.673592
Platform: Linux-6.8.0-124-generic-x86_64-with-glibc2.39
<snip>
test_HEALPix_pix2zuniq (__main__.DataTest.test_HEALPix_pix2zuniq)
Test _pix2zuniq ... ERROR
test_HEALPix_uniq2zuniq (__main__.DataTest.test_HEALPix_uniq2zuniq)
Test _uniq2zuniq ... ERROR
test_HEALPix_zuniq2pix (__main__.DataTest.test_HEALPix_zuniq2pix)
Test _zuniq2pix ... ERROR
test_HEALPix_zuniq2uniq (__main__.DataTest.test_HEALPix_zuniq2uniq)
Test _zuniq2uniq ... ERROR
======================================================================
ERROR: test_HEALPix_pix2zuniq (__main__.DataTest.test_HEALPix_pix2zuniq)
Test _pix2zuniq
----------------------------------------------------------------------
Traceback (most recent call last):
File "cf-python/cf/test/test_HEALPix_utils.py", line 84, in test_HEALPix_pix2zuniq
for r, i in zip(refinement_levels, nested_indices)
^^^^^^^^^^^^^^^^^
NameError: name 'refinement_levels' is not defined
======================================================================
ERROR: test_HEALPix_uniq2zuniq (__main__.DataTest.test_HEALPix_uniq2zuniq)
Test _uniq2zuniq
----------------------------------------------------------------------
Traceback (most recent call last):
File "cf-python/cf/test/test_HEALPix_utils.py", line 52, in test_HEALPix_uniq2zuniq
np.array_equal(_uniq2zuniq(nuniq_indices), zuniq_indices)
^^^^^^^^^^^^^
NameError: name 'nuniq_indices' is not defined
======================================================================
ERROR: test_HEALPix_zuniq2pix (__main__.DataTest.test_HEALPix_zuniq2pix)
Test _zuniq2pix
----------------------------------------------------------------------
Traceback (most recent call last):
File "cf-python/cf/test/test_HEALPix_utils.py", line 68, in test_HEALPix_zuniq2pix
order, i = _zuniq2pix(zuniq_indices, nest=True)
^^^^^^^^^^^^^
NameError: name 'zuniq_indices' is not defined
======================================================================
ERROR: test_HEALPix_zuniq2uniq (__main__.DataTest.test_HEALPix_zuniq2uniq)
Test _zuniq2uniq
----------------------------------------------------------------------
Traceback (most recent call last):
File "cf-python/cf/test/test_HEALPix_utils.py", line 60, in test_HEALPix_zuniq2uniq
np.array_equal(_zuniq2uniq(zuniq_indices), nuniq_indices)
^^^^^^^^^^^^^
NameError: name 'zuniq_indices' is not defined
----------------------------------------------------------------------
Ran 4 tests in 0.009s
FAILED (errors=4)
>>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
We have some test skipping for lack of required module availability, including cases where it is an 'optional' dependency not enforced by packaging requirements, but not comprehensive and not accounting for the new
healpixoptional dependency.In the background to the EXPECT GA I've went in and added all skips required, replacing those on individual methods with module-level skipping for relevant test modules (regrid-related tests which all need
esmpyincluding one case where there was a false positive i.e. test pass from lack of skip, and tests requiring an explicit or under-the-hood use ofhealpix).@davidhassell a sanity check would be useful but feel free to approve if you don't think a review is necessary given this PR is only trivial test infra changes.