-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
TST: GH30999 address all bare pytest.raises in pandas/tests/arrays/boolean/test_arithmetic.py #38849
TST: GH30999 address all bare pytest.raises in pandas/tests/arrays/boolean/test_arithmetic.py #38849
Conversation
@@ -46,7 +46,7 @@ def test_add_mul(left_array, right_array, opname, exp): | |||
|
|||
|
|||
def test_sub(left_array, right_array): | |||
with pytest.raises(TypeError): | |||
with tm.external_error_raised(TypeError): |
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.
hmm i actually think showing these errors would be good. yes they might be external, but these are important to see.
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.
ok done
@@ -46,8 +47,11 @@ def test_add_mul(left_array, right_array, opname, exp): | |||
|
|||
|
|||
def test_sub(left_array, right_array): | |||
with pytest.raises(TypeError): | |||
# numpy points to ^ operator or logical_xor function instead | |||
msg = re.escape( |
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.
ok great. yeah these are expected. i don't like the external_ thing because it is not obvious what is happening.
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.
I don't like it much either but it's what the guidance in the issue says to do. shrug
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.
hah, that's why I look at all the PRs :->
…ecated" instead of "not supported"
…olean/test_arithmetic.py (pandas-dev#38849)
xref #30999 I thought I was done with the simple bare
pytest.raise
instances but I somehow missed this test module. Four instances, three fixed by addingmatch
and one by usingtm.external_error_raised
because I believe the error comes from numpy.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff