Skip to content

Conversation

@moink
Copy link
Contributor

@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