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

TST: add message matches to pytest.raises in various tests GH30999 #38350

Merged
merged 8 commits into from
Dec 8, 2020
Merged

TST: add message matches to pytest.raises in various tests GH30999 #38350

merged 8 commits into from
Dec 8, 2020

Conversation

JoseNavy
Copy link
Contributor

@JoseNavy JoseNavy commented Dec 8, 2020

  • ref #30999
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Files changed:
pandas/tests/io/pytables/test_complex.py
pandas/tests/io/test_clipboard.py
pandas/tests/plotting/frame/test_frame_subplots.py

@JoseNavy
Copy link
Contributor Author

JoseNavy commented Dec 8, 2020

I tried to follow the contributing guidelines as best as I could. If there's any problem, let me know.

Edit: Looks like some tests didn't pass. @MarcoGorelli can you give me some pointers on how to fix this?

# test case for testing invalid encoding
with pytest.raises(ValueError):
with pytest.raises(ValueError, match=msg):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at the CI the message being thrown is different

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that the message didn't exist and wrote one, I'll fix them so they match with what's supposed to say. Where can I find the exact message?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

run the code that throws the error

@jreback jreback added the Testing pandas testing functions or related to the test suite label Dec 8, 2020
@jreback jreback added this to the 1.3 milestone Dec 8, 2020
@jreback jreback merged commit 32bebdb into pandas-dev:master Dec 8, 2020
@jreback
Copy link
Contributor

jreback commented Dec 8, 2020

thanks @JoseNavy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants