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

fix: Incorrect logic in assert_series_equal for infinities #20763

Merged
merged 3 commits into from
Jan 17, 2025

Conversation

lukemanley
Copy link
Contributor

@lukemanley lukemanley commented Jan 17, 2025

fixes #16859

main branch does not raise for the following example:

import polars as pl
from polars.testing import assert_series_equal

s1 = pl.Series([1.0])
s2 = pl.Series([float("inf")])

assert_series_equal(s1, s2)

This PR:

AssertionError: Series are different (value mismatch)
[left]:  [1.0]
[right]: [inf]

@github-actions github-actions bot added fix Bug fix python Related to Python Polars rust Related to Rust Polars labels Jan 17, 2025
Copy link

codecov bot commented Jan 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.74%. Comparing base (725c960) to head (2ab8da4).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #20763      +/-   ##
==========================================
- Coverage   79.74%   79.74%   -0.01%     
==========================================
  Files        1561     1561              
  Lines      222012   222012              
  Branches     2530     2530              
==========================================
- Hits       177049   177040       -9     
- Misses      44381    44390       +9     
  Partials      582      582              

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

@ritchie46 ritchie46 merged commit 6753bb6 into pola-rs:main Jan 17, 2025
15 checks passed
@lukemanley lukemanley deleted the assert-series-equal-inf branch January 23, 2025 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars rust Related to Rust Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

polars.testing.assert_series_equal has incorrect logic for infinities
2 participants