Skip to content

TST/CLN: centralize module check funcs #7451

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 1 commit into from
Jun 21, 2014
Merged

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented Jun 13, 2014

  • Moved duplicated module check functions to util.testing
  • Remove some unnecessary import

@jreback
Copy link
Contributor

jreback commented Jun 13, 2014

looks reasonable

@jreback
Copy link
Contributor

jreback commented Jun 13, 2014

can I update the wiki to mention in the testing section that this is how to skip tests if the import isn't available

thanks

import scipy.interpolate
except ImportError:
import nose
raise nose.SkipTest('scipy.interpolate missing')
Copy link
Member

Choose a reason for hiding this comment

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

I don't think it ever happens one of the two is available and the other not? (all scipy version we support have both submodules?) So maybe just checking for scipy? (because now you will get scipy.stats not installed for tests that need scipy.interpolate

Copy link
Contributor

Choose a reason for hiding this comment

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

not true
scipy 0.10 or 0.11 breaks on scipy.stats (I have it on windows)

Copy link
Member

Choose a reason for hiding this comment

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

ah, didn't know (never had that problem on windows). But still, shouldn't it be in two seperate functions then? The tests that use interpolate should not be skipped due to stats?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or leave it local func because scipy.interpolate requirement is only checked in test_generic.py.

@jreback jreback added this to the 0.14.1 milestone Jun 14, 2014
jreback added a commit that referenced this pull request Jun 21, 2014
TST/CLN: centralize module check funcs
@jreback jreback merged commit db9128d into pandas-dev:master Jun 21, 2014
@sinhrks sinhrks deleted the skiptest branch June 21, 2014 22:42
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.

3 participants