Skip to content

TST: GH30999 Add match=msg to all pytest.raises in tests/generic/methods/test_sample.py #38695

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

Conversation

moink
Copy link
Member

@moink moink commented Dec 25, 2020

This pull request partially addresses xref #30999 to remove bare pytest.raises by adding match=msg. It doesn't close that issue as I have only addressed one test module: pandas/tests/generic/methods/test_sample.py

The only other thing I did was move a few lines out of the pytest.raises context as they were setup lines that did not raise the error, in order to make it clear which pandas method was raising the error.

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

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

Nice, thanks @moink !

@MarcoGorelli MarcoGorelli added this to the 1.3 milestone Dec 27, 2020
@jreback jreback added Error Reporting Incorrect or improved errors from pandas Testing pandas testing functions or related to the test suite labels Dec 27, 2020
@jreback jreback merged commit e4f35f4 into pandas-dev:master Dec 27, 2020
@jreback
Copy link
Contributor

jreback commented Dec 27, 2020

thanks @moink

luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Error Reporting Incorrect or improved errors from pandas 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