-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
docs(python): Various docstring improvements to testing.assert_*
functions
#18494
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #18494 +/- ##
==========================================
+ Coverage 79.84% 79.86% +0.02%
==========================================
Files 1501 1501
Lines 202032 202033 +1
Branches 2868 2868
==========================================
+ Hits 161309 161354 +45
+ Misses 40176 40132 -44
Partials 547 547 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @henryharbeck
nice one on the links, not sure about the docstring changes though
if I do
Examples
--------
>>> from polars.testing import assert_frame_equal
>>> df1 = pl.DataFrame({"a": [1, 2, 3]})
>>> df2 = pl.DataFrame({"a": [1, 5, 3]})
>>> assert_frame_equal(df1, df2)
Traceback (most recent call last):
...
AssertionError: DataFrames are different (value mismatch for column 'a')
[left]: [1, 2, 3]
[right]: [1, 5, 3]
then the doctest passes without having to skip it, would that work instead of try/except
?
Thank you @MarcoGorelli! Appreciate the constructive review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @henryharbeck ! leaving open a bit in case anyone objects, then will ship it
Fixes a few minor docstring issues:
DataFrame.equals
andSeries.equals
assert_*
functions and don't skip the doctestsassert_frame_equal
), so I think this is worthwhileassert_frame_not_equal
as is done inassert_frame_equal