Skip to content

TST: Add isolated and integration tests for _column_mixins.pyx Cython shims#19492

Open
kartavayv wants to merge 1 commit intoastropy:mainfrom
kartavayv:wtests-clean
Open

TST: Add isolated and integration tests for _column_mixins.pyx Cython shims#19492
kartavayv wants to merge 1 commit intoastropy:mainfrom
kartavayv:wtests-clean

Conversation

@kartavayv
Copy link
Copy Markdown
Contributor

This file adds some tests for _column_mixins.pyx shims. It does this by adding a new file test_column_mixins.py. This file contains tests divided in two layers:

  • Isolated Tests: Tests which solely focus on the efficiency of shims, independent of Column and MaskedColumn
  • Integration Tests: Tests which do include Column and MaskedColumn

Tests Added

TestColumnGetitemShimDirect

- test_multidim_integer_index_returns_ndarray
- test_multidim_slice_preserves_subclass
- test_void_dtype_string_key
- test_byte_decoding
- test_bytes_dtype_slice_not_decoded
- test_sigdim_integer_index
- test_sigdim_slice
- test_sigdim_boolean_mask
- test_sigdim_fancy_indexing
- test_out_of_bounds_raises_index_error

TestMaskedColumnGetitemShimDirect

- test_masked_scalar_returns_masked_constant
- test_unmasked_scalar_returns_value
- test_multidim_integer_index_returns_masked_array
- test_slice_preserves_mask

TestColumnGetitemShim

- test_multidim_integer_index_returns_ndarray_not_column
- test_void_dtype_string_key
- test_bytes_dtype_scalar_decoded
- test_multidim_integer_index
- test_multidim_slicing
- test_multidim_fancy_indexing
- test_sigdim_scalar_integer_index
- test_sigdim_slicing
- test_sigdim_boolean_mask
- test_sigdim_out_of_bounds_raises
- test_sigdim_property_preservation_on_slice

TestMaskedColumnGetitemShim

- test_sigdim_masked_scalar_access
- test_multidim_integer_index_returns_masked_array
- test_getitem_preserves_column_attributes
- test_mask_propagation_on_slice

@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants