Skip to content

Conversation

@sumanau7
Copy link
Contributor

@sumanau7 sumanau7 commented Mar 28, 2020

@sumanau7 sumanau7 changed the title Bug 30999 Check error message for raised exception Mar 28, 2020
@sumanau7
Copy link
Contributor Author

@MomIsBestFriend Please review.

@sumanau7
Copy link
Contributor Author

@MomIsBestFriend Green.

@ShaharNaveh
Copy link
Contributor

* [x]  closes #30999

* [x]  tests added / passed

* [x]  passes `black pandas`

* [x]  passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

* [ ]  whatsnew entry

@sumanau7 Can you please change the word "closes" to the word "xref"?

Copy link
Contributor

@ShaharNaveh ShaharNaveh left a comment

Choose a reason for hiding this comment

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

In a few spots you are using f-strings where there isn't a reason to do so.

otherwise this is LGTM :)

@sumanau7
Copy link
Contributor Author

@MomIsBestFriend Green.

Copy link
Contributor

@ShaharNaveh ShaharNaveh left a comment

Choose a reason for hiding this comment

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

Small nitpick

index = period_range("1/1/2000", "1/20/2000", freq="D")
index3 = period_range("1/1/2000", "1/20/2000", freq="2D")
with pytest.raises(IncompatibleFrequency):
msg = r".*Input has different freq=2D from PeriodIndex\(freq=D\)"
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
msg = r".*Input has different freq=2D from PeriodIndex\(freq=D\)"
msg = r"Input has different freq=2D from PeriodIndex\(freq=D\)"

@jreback jreback added the Error Reporting Incorrect or improved errors from pandas label Mar 29, 2020
@jreback jreback added this to the 1.1 milestone Mar 29, 2020
@jreback jreback merged commit 24bb514 into pandas-dev:master Mar 29, 2020
@jreback
Copy link
Contributor

jreback commented Mar 29, 2020

thanks @sumanau7

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants