Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add unit tests for str.contains_any and str.replace_many #17961

Merged
merged 1 commit into from
Aug 1, 2024

Conversation

henryharbeck
Copy link
Contributor

Was going to pick up #17220 and noticed there were no tests for these two methods. Good to add tests first before making any changes.

I've only included tests that conform to more strict Series function signature, so that the Series and Expression methods can be tested together. I'm unsure if the Expression function signature is intentionally more lax than the Series counterpart. The expression methods also give some unexpected results IMO (I raised #17863 for this).

In terms of the PR - I tried to test a good variety of input types and combinations, but let me know if this is overboard.

@github-actions github-actions bot added internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars labels Jul 31, 2024
Copy link

codecov bot commented Jul 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.46%. Comparing base (4275808) to head (0906fee).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17961      +/-   ##
==========================================
+ Coverage   80.36%   80.46%   +0.10%     
==========================================
  Files        1494     1494              
  Lines      196452   196480      +28     
  Branches     2817     2817              
==========================================
+ Hits       157869   158090     +221     
+ Misses      38063    37870     -193     
  Partials      520      520              

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

@alexander-beedie
Copy link
Collaborator

Very nice; additional test coverage is always welcome!

@alexander-beedie alexander-beedie merged commit e047fa6 into pola-rs:main Aug 1, 2024
14 checks passed
@henryharbeck henryharbeck deleted the replace-many branch August 1, 2024 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internal An internal refactor or improvement python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants