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

MAINT: Rename assertRaisesRegexp to assert_raises_regex #16119

Merged
merged 1 commit into from
Apr 26, 2017

Conversation

gfyoung
Copy link
Member

@gfyoung gfyoung commented Apr 24, 2017

Title is self-explanatory.

xref #16089 (comment)

@jreback
Copy link
Contributor

jreback commented Apr 24, 2017

assert_raises_regex is a bit shorter

@codecov
Copy link

codecov bot commented Apr 24, 2017

Codecov Report

Merging #16119 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16119      +/-   ##
==========================================
+ Coverage   90.84%   90.86%   +0.02%     
==========================================
  Files         159      159              
  Lines       50779    50779              
==========================================
+ Hits        46128    46141      +13     
+ Misses       4651     4638      -13
Flag Coverage Δ
#multiple 88.64% <100%> (+0.02%) ⬆️
#single 40.33% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/util/testing.py 79.07% <100%> (ø) ⬆️
pandas/core/common.py 91.03% <0%> (+0.34%) ⬆️
pandas/plotting/_converter.py 65.35% <0%> (+1.81%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d50b162...7a58c30. Read the comment docs.

@gfyoung
Copy link
Member Author

gfyoung commented Apr 25, 2017

I was thinking the "with" makes the name a little clearer (from a grammatical perspective especially). What do you think?

@jreback jreback added the Testing pandas testing functions or related to the test suite label Apr 25, 2017
@jreback
Copy link
Contributor

jreback commented Apr 25, 2017

with tm.assert_raises_with_regex(
                 ValueError, "\"mysin\" is not a supported function"):

This is much more clear (and not redundant).

with tm.assert_raises_regex(
                 ValueError, "\"mysin\" is not a supported function"):

@gfyoung
Copy link
Member Author

gfyoung commented Apr 25, 2017

Fair enough. Done.

@gfyoung gfyoung changed the title MAINT: Rename assertRaisesRegexp to assert_raises_with_regex MAINT: Rename assertRaisesRegexp to assert_raises_regex Apr 25, 2017
@gfyoung gfyoung force-pushed the assert-raises-regex-rename branch 3 times, most recently from 340549a to 7a58c30 Compare April 26, 2017 03:06
@gfyoung
Copy link
Member Author

gfyoung commented Apr 26, 2017

@jreback : It would be great to get this merged in ASAP, since every time master gets updated, I have to rebase (like I have to now) to ensure that there are no merge conflicts + no new assertRaisesRegexp have been used.

@jreback jreback added this to the 0.20.0 milestone Apr 26, 2017
@jreback jreback merged commit 1a93759 into pandas-dev:master Apr 26, 2017
@jreback
Copy link
Contributor

jreback commented Apr 26, 2017

yes, sorry, busy with some other things.

thanks @gfyoung

@gfyoung
Copy link
Member Author

gfyoung commented Apr 26, 2017

@jreback : No worries, but FYI, master is going to break because I was just going to remove the remain assertRaisesRegexp from the latest commits before you merged.

@gfyoung gfyoung deleted the assert-raises-regex-rename branch April 26, 2017 15:45
@gfyoung
Copy link
Member Author

gfyoung commented Apr 26, 2017

@jreback : Putting up PR right now to patch this immediately.

gfyoung added a commit to forking-repos/pandas that referenced this pull request Apr 26, 2017
Removes remaining assertRaisesRegexp before
pandas-devgh-16119 got merged.
@jreback
Copy link
Contributor

jreback commented Apr 26, 2017

yep

jreback pushed a commit that referenced this pull request Apr 26, 2017
Removes remaining assertRaisesRegexp before
gh-16119 got merged.
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
pcluo pushed a commit to pcluo/pandas that referenced this pull request May 22, 2017
Removes remaining assertRaisesRegexp before
pandas-devgh-16119 got merged.
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.

2 participants