-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
add match message for pytest.raises() #33144
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
Changes from all commits
cb2eae7
8ec1552
8d8759c
9d6b5c6
3aa222b
a958b81
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -175,6 +175,6 @@ def test_delete_base(idx): | |
assert result.equals(expected) | ||
assert result.name == expected.name | ||
|
||
with pytest.raises((IndexError, ValueError)): | ||
# Exception raised depends on NumPy version. | ||
msg = "index 6 is out of bounds for axis 0 with size 6" | ||
with pytest.raises(IndexError, match=msg): | ||
idx.delete(len(idx)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In earlier versions NumPy used to raise ValueError, pandas setup.py has defined min_numpy_version to 1.13.3. Since NumPy 1.13.3, IndexError is being raised There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sathyz Thank you for looking into this! |
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.
are we testing the missing-argument case somewhere else?
i think the "either depending..." comment is obsolete