test: refactor test_data_color_utils.py through parametrization#740
Open
FBruzzesi wants to merge 8 commits intoposit-dev:mainfrom
Open
test: refactor test_data_color_utils.py through parametrization#740FBruzzesi wants to merge 8 commits intoposit-dev:mainfrom
test_data_color_utils.py through parametrization#740FBruzzesi wants to merge 8 commits intoposit-dev:mainfrom
Conversation
FBruzzesi
commented
Jul 30, 2025
|
|
||
| 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] |
Contributor
Author
There was a problem hiding this comment.
Reason for this change is that .is_nan raises an exception for non-numeric arrays. It was not tested for pyarrow before
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #740 +/- ##
==========================================
+ Coverage 92.31% 92.33% +0.01%
==========================================
Files 48 48
Lines 6039 6039
==========================================
+ Hits 5575 5576 +1
+ Misses 464 463 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
@rich-iannone do you mind reviewing this? |
FBruzzesi
commented
Jul 31, 2025
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] |
Contributor
Author
There was a problem hiding this comment.
Reason for this is that I was getting warnings that
SeriesLikeis partially unknown
FBruzzesi
commented
Jul 31, 2025
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.
Summary
As per title: this PR aims to refactor
test_data_color_utilsby 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.pyto test with all backends)Checklist