Skip to content

TST: add _honors_copy_keyword to extension test base class#65179

Draft
jbrockmendel wants to merge 1 commit intopandas-dev:mainfrom
jbrockmendel:tst-63040
Draft

TST: add _honors_copy_keyword to extension test base class#65179
jbrockmendel wants to merge 1 commit intopandas-dev:mainfrom
jbrockmendel:tst-63040

Conversation

@jbrockmendel
Copy link
Copy Markdown
Member

Summary

  • Add a _honors_copy_keyword method to BaseMissingTests so test_fillna_readonly skips the copy=False assertion for EAs that always return new data regardless. Removes full test overrides in sparse, arrow, string, interval, and decimal test classes.
  • Skip the mutation check in test_fillna_copy_frame / test_fillna_copy_series for immutable dtypes, following the existing _is_immutable pattern in test_ravel / test_transpose. Removes two more sparse overrides.

closes #63040

Test plan

  • All extension test suites pass (sparse, arrow, string, interval, decimal, masked, numpy, datetime, period, json — 40828 passed)

🤖 Generated with Claude Code

Add a `_honors_copy_keyword` method to `BaseMissingTests` so that
`test_fillna_readonly` can skip the `copy=False` assertion for EAs
that always return new data regardless. This removes full test
overrides in sparse, arrow, string, interval, and decimal test
classes.

Also skip the mutation check in `test_fillna_copy_frame` and
`test_fillna_copy_series` for immutable dtypes, following the
existing `_is_immutable` pattern in `test_ravel`/`test_transpose`.
This removes two more sparse overrides.

closes pandas-dev#63040

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@jbrockmendel jbrockmendel added the Testing pandas testing functions or related to the test suite label Apr 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Testing pandas testing functions or related to the test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

not necessarily for this PR, but should we add an EA attribute specifying whether copy=False is ignored? that way we could avoid overriding tests?

1 participant