Skip to content

upadting doc string #58830

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

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions pandas/tests/arithmetic/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@

def assert_cannot_add(left, right, msg="cannot add"):
"""
Helper to assert that left and right cannot be added.
Helper function to assert that two objects cannot be added.

Parameters
----------
left : object
The first operand.
right : object
The second operand.
msg : str, default "cannot add"
The error message expected in the TypeError.
"""
with pytest.raises(TypeError, match=msg):
left + right
Expand All @@ -36,13 +39,17 @@ def assert_cannot_add(left, right, msg="cannot add"):

def assert_invalid_addsub_type(left, right, msg=None):
"""
Helper to assert that left and right can be neither added nor subtracted.
Helper function to assert that two objects can
neither be added nor subtracted.

Parameters
----------
left : object
The first operand.
right : object
The second operand.
msg : str or None, default None
The error message expected in the TypeError.
"""
with pytest.raises(TypeError, match=msg):
left + right
Expand Down
Loading