Skip to content

Conversation

@FBruzzesi
Copy link
Contributor

Summary

As per title: this PR aims to refactor test_data_color_utils by exploiting pytest parametrization.

On top of it, it sets up the stage for a dataframe constructor fixture to be used elsewhere (e.g. follow up on test_data_color.py to test with all backends)

Checklist


arr = pa.array([x])
return arr.is_null().to_pylist()[0] or arr.is_nan().to_pylist()[0]
return arr.is_null(nan_is_null=True).to_pylist()[0]
Copy link
Contributor Author

@FBruzzesi FBruzzesi Jul 30, 2025

Choose a reason for hiding this comment

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

Reason for this change is that .is_nan raises an exception for non-numeric arrays. It was not tested for pyarrow before

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.63%. Comparing base (a59301b) to head (befd661).

Additional details and impacted files
@@ Coverage Diff @@ ## main #740 +/- ## ========================================== + Coverage 91.61% 91.63% +0.01%  ========================================== Files 47 47 Lines 5773 5773 ========================================== + Hits 5289 5290 +1  + Misses 484 483 -1 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@machow
Copy link
Collaborator

machow commented Jul 31, 2025

@rich-iannone do you mind reviewing this?

Comment on lines -32 to +35
PdSeries = pd.Series
PdSeries = pd.Series[Any]
PlSeries = pl.Series
PyArrowArray = pa.Array
PyArrowChunkedArray = pa.ChunkedArray
PyArrowArray = pa.Array[Any]
PyArrowChunkedArray = pa.ChunkedArray[Any]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Reason for this is that I was getting warnings that

SeriesLike is partially unknown

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

Labels

None yet

2 participants