Skip to content

Check error message for raised exception #33103

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

Merged
merged 6 commits into from
Mar 29, 2020
Merged

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
Member

* [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
Member

@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
Member

@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

@@ -39,5 +39,6 @@ def test_join_does_not_recur(self):
def test_join_mismatched_freq_raises(self):
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
Member

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