-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: tm.assert_raises_regex --> pytest.raises #23592
MAINT: tm.assert_raises_regex --> pytest.raises #23592
Conversation
261ec39
to
81e7c42
Compare
Codecov Report
@@ Coverage Diff @@
## master #23592 +/- ##
==========================================
- Coverage 92.25% 92.24% -0.02%
==========================================
Files 161 161
Lines 51277 51278 +1
==========================================
- Hits 47305 47299 -6
- Misses 3972 3979 +7
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really nice work. My browser had problems to load the whole diff, so I guess this kept you entertained for a while... ;)
Looks really good, there are just few things I don't understand.
@gfyoung wasn't expecting all of these in a single PR. ok though. |
can you deprecate tm.assert_raises_regex as well. and update the docs. |
ping when ready |
Let's do that in a separate PR? This diff is already huge to check |
yes this is ok |
|
Then let's add it back here, if we want to deprecate it (which I think is a good idea) |
@jreback @jorisvandenbossche : Why are we deprecating? It's not even part of the public testing API (in
|
the reason to deprecate is that it’s in our public ish testing interface and has been around for a while - we can just remove in the next version (short deprecation cycle) |
@jreback : Okay, that's fair. I'll deprecate this then and have it removed in the next major release (either |
f0cfe1c
to
325adea
Compare
pytest.raises has all of the functionality that we need from tm.assert_raises_regex. Closes pandas-devgh-16521.
325adea
to
2b7fb24
Compare
@jreback @datapythonista : Addressed all comments, and all is still green. PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thanks @gfyoung
thanks! |
…fixed * upstream/master: DOC: Fixes to docstring to add validation to CI (pandas-dev#23560) DOC: Remove incorrect periods at the end of parameter types (pandas-dev#23600) MAINT: tm.assert_raises_regex --> pytest.raises (pandas-dev#23592) DOC: Updating Series.resample and DataFrame.resample docstrings (pandas-dev#23197) ENH: Support for partition_cols in to_parquet (pandas-dev#23321) TST: Use intp as expected dtype in IntervalIndex indexing tests (pandas-dev#23609)
* upstream/master: BUG: Casting tz-aware DatetimeIndex to object-dtype ndarray/Index (pandas-dev#23524) BUG: Delegate more of Excel parsing to CSV (pandas-dev#23544) API: DataFrame.__getitem__ returns Series for sparse column (pandas-dev#23561) CLN: use float64_t consistently instead of double, double_t (pandas-dev#23583) DOC: Fix Order of parameters in docstrings (pandas-dev#23611) TST: Unskip some Categorical Tests (pandas-dev#23613) TST: Fix integer ops comparison test (pandas-dev#23619) DOC: Fixes to docstring to add validation to CI (pandas-dev#23560) DOC: Remove incorrect periods at the end of parameter types (pandas-dev#23600) MAINT: tm.assert_raises_regex --> pytest.raises (pandas-dev#23592) DOC: Updating Series.resample and DataFrame.resample docstrings (pandas-dev#23197)
didn’t check but do we fail an internal build if assert_raises_regex is used? sure it would raise a FutureWarning but that doesn’t always fail it i think |
The numpydev job will fail if we use it in a test that is run, but that
doesn't have all the optional dependencies
so some tests are skipped.
…On Sun, Nov 11, 2018 at 1:09 PM Jeff Reback ***@***.***> wrote:
didn’t check but do we fail an internal build if assert_raises_regex is
used?
sure it would raise a FutureWarning but that doesn’t always fail it i think
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#23592 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABQHIoM8fzT1P-JT--yvCcI9L5WQAksEks5uuHXdgaJpZM4YWP16>
.
|
ok @gfyoung can u add to the code_checks then to look for this (we already do for things like np.testing) |
@jreback @TomAugspurger : I grepped the entire codebase, and the only instances of The warnings should cause the |
I think the idea is not on what we have now, but in case someone creates a new PR that uses |
Opened #23627 with the check. |
* MAINT: tm.assert_raises_regex --> pytest.raises pytest.raises has all of the functionality that we need from tm.assert_raises_regex. Closes pandas-devgh-16521. * Don't remove, just deprecate assert_raises_regex * CLN: Test cleanups and follow-ups
* MAINT: tm.assert_raises_regex --> pytest.raises pytest.raises has all of the functionality that we need from tm.assert_raises_regex. Closes pandas-devgh-16521. * Don't remove, just deprecate assert_raises_regex * CLN: Test cleanups and follow-ups
* MAINT: tm.assert_raises_regex --> pytest.raises pytest.raises has all of the functionality that we need from tm.assert_raises_regex. Closes pandas-devgh-16521. * Don't remove, just deprecate assert_raises_regex * CLN: Test cleanups and follow-ups
* MAINT: tm.assert_raises_regex --> pytest.raises pytest.raises has all of the functionality that we need from tm.assert_raises_regex. Closes pandas-devgh-16521. * Don't remove, just deprecate assert_raises_regex * CLN: Test cleanups and follow-ups
pytest.raises
has all of the functionality that we need fromtm.assert_raises_regex
.Closes #16521 (for good this time! 🙂 ).
If this is something we would like to have for
0.24.0
, I would ask that this get reviewed and merged ASAP, given how massive the refactoring is and the high probability of merge conflicts.cc @pandas-dev/pandas-core