Skip to content

TST: Catch Warnings in tests #8397

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

Closed
TomAugspurger opened this issue Sep 26, 2014 · 7 comments
Closed

TST: Catch Warnings in tests #8397

TomAugspurger opened this issue Sep 26, 2014 · 7 comments
Labels
Testing pandas testing functions or related to the test suite
Milestone

Comments

@TomAugspurger
Copy link
Contributor

If only to have nicer looking test output.

.../Users/tom/Envs/py3/lib/python3.4/site-packages/pandas/pandas/tools/plotting.py:3229: UserWarning: To output multiple subplots, the figure containing the passed axes is being cleared
  "is being cleared", UserWarning)
../Users/tom/Envs/py3/lib/python3.4/site-packages/pandas/pandas/tools/plotting.py:3212: UserWarning: When passing multiple axes, sharex and sharey are ignored.These settings must be specified when creating axes
  "These settings must be specified when creating axes", UserWarning)
............................S..S.../Users/tom/Envs/py3/lib/python3.4/site-packages/matplotlib-1.5.x-py3.4-macosx-10.9-x86_64.egg/matplotlib/axes/_axes.py:475: UserWarning: No labelled objects found. Use label='...' kwarg on individual plots.
  warnings.warn("No labelled objects found. "
.S.............................................../Users/tom/Envs/py3/lib/python3.4/site-packages/pandas/pandas/tools/plotting.py:3209: UserWarning: When passing multiple axes, layout keyword is ignored
  warnings.warn("When passing multiple axes, layout keyword is ignored", UserWarning)
@jreback
Copy link
Contributor

jreback commented Sep 26, 2014

yep, these should be explicity tested/caught. Maybe add checkboxes to list them out ?

@jreback jreback added the Testing pandas testing functions or related to the test suite label Sep 26, 2014
@jreback jreback added this to the 0.15.1 milestone Sep 26, 2014
@TomAugspurger
Copy link
Contributor Author

I'm doing graphics right now. Will tick them off by module as I go.

@jankatins
Copy link
Contributor

Isn't there some way to make all uncaught warnings failures?

@jreback
Copy link
Contributor

jreback commented Sep 26, 2014

warnings.simplefilter('error',Warning) I think works (to sort of figure this out)

Sort of do this here: (this is for the experimental builds): https://github.com/pydata/pandas/blob/master/pandas/util/testing.py#L62

@TomAugspurger
Copy link
Contributor Author

@jreback I just found out that you can do that and came here to post it :)

I'll get back to this soon. It'll be so much easier now that it raises.

@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@jreback jreback modified the milestones: 0.18.0, Next Major Release Feb 13, 2016
@jreback jreback modified the milestones: 0.18.1, 0.18.0 Feb 13, 2016
@jreback jreback reopened this Feb 13, 2016
@jreback
Copy link
Contributor

jreback commented Feb 13, 2016

this doesn't fix the slow tests :<

@jreback jreback modified the milestones: 0.18.2, 0.18.1 Apr 18, 2016
@jorisvandenbossche jorisvandenbossche modified the milestones: 0.20.0, 0.19.0 Sep 1, 2016
@jreback
Copy link
Contributor

jreback commented Mar 23, 2017

closing this, i think we are better at this.

@jreback jreback closed this as completed Mar 23, 2017
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 a pull request may close this issue.

4 participants