test: refactor test_data_color_utils.py through parametrization#740
Conversation
|
|
||
| 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] |
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 93.00% 93.02% +0.01%
==========================================
Files 48 48
Lines 6379 6379
==========================================
+ Hits 5933 5934 +1
+ Misses 446 445 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@rich-iannone do you mind reviewing this? |
| PdSeries = pd.Series | ||
| PdSeries = pd.Series[Any] | ||
| PlSeries = pl.Series | ||
| PyArrowArray = pa.Array | ||
| PyArrowChunkedArray = pa.ChunkedArray | ||
| PyArrowArray = pa.Array[Any] | ||
| PyArrowChunkedArray = pa.ChunkedArray[Any] |
There was a problem hiding this comment.
Reason for this is that I was getting warnings that
SeriesLikeis partially unknown
|
Thanks @rich-iannone 🙏 |
|
Really sorry this took so long, but I do appreciate the continued support! |
Nothing to be sorry about! Happy to contribute to the project 🙂 |
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