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

TST: remove nose #15368

Closed
wants to merge 1 commit into from
Closed

TST: remove nose #15368

wants to merge 1 commit into from

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Feb 11, 2017

TST: raise nose.SkipTest -> pytest.skip
TST: remove KnownFailure (unused), should be replaced by pytest.xfail anyhow

xref #15341

@jreback jreback added the Testing pandas testing functions or related to the test suite label Feb 11, 2017
@jreback jreback added this to the 0.20.0 milestone Feb 11, 2017
@TomAugspurger TomAugspurger mentioned this pull request Feb 11, 2017
17 tasks
@jreback jreback changed the title TST: raise nose.SkipTest -> pytest.skip TST: remove nose Feb 11, 2017
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

Added some minor comments.

else:
msg = "not using"
raise nose.SkipTest("{0} numexpr".format(msg))
numexpr = pytest.importorskip('numexpr')
Copy link
Member

Choose a reason for hiding this comment

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

Didn't look into if this is important, but the importskip here is not fully equivalent with the above.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah this is the only way to actually skip the entire module (well you can simply use a skipif on the classes, but this is cleaner).

Copy link
Member

Choose a reason for hiding this comment

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

I meant that previously the test was also skipped if _USE_NUMPEXPR is false, now only when the import fails

Copy link
Contributor Author

Choose a reason for hiding this comment

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

_USE_NUMEXPR == can import numexpr (and its not turned off)

exc_failed_import : Exception, optional
Class of the exception to be thrown if import failed.
exc_failed_check : Exception, optional
Class of the exception to be thrown if version check failed.
Copy link
Member

Choose a reason for hiding this comment

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

also remove the actual arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

package_check(exc_failed_import=SkipTest,
exc_failed_check=SkipTest,
*args, **kwargs)
package_check(*args, **kwargs)


def skip_if_no_package_deco(pkg_name, version=None, app='pandas'):
Copy link
Member

Choose a reason for hiding this comment

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

remove this whole function? It's nowhere used, and you removed its tests

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah I don't know how to actually test if a tests is actually skipped; in nose you can catch the SkipTest, but for pytest you would never do this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, removing it. We have lots of testing cruft that pytest just does for free.

TST: remove KnownFailure (unused), should be replaced by pytest.xfail anyhow

TST: remove nose

xref pandas-dev#15341
@jreback jreback closed this in 61a243b Feb 11, 2017
AnkurDedania pushed a commit to AnkurDedania/pandas that referenced this pull request Mar 21, 2017
TST: raise nose.SkipTest -> pytest.skip  TST: remove KnownFailure
(unused), should be replaced by pytest.xfail anyhow    xref pandas-dev#15341

Author: Jeff Reback <jeff@reback.net>

Closes pandas-dev#15368 from jreback/skip and squashes the following commits:

afdb5f9 [Jeff Reback] TST: raise nose.SkipTest -> pytest.skip
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.

None yet

2 participants