scikit-learn/sklearn/tests/test_init.py

23 lines
519 B
Python
Raw Normal View History

# Basic unittests to test functioning of module's top-level
__author__ = 'Yaroslav Halchenko'
__license__ = 'BSD'
2012-10-25 14:31:35 +08:00
from sklearn.utils.testing import assert_equal
try:
from sklearn import *
_top_import_error = None
2011-12-11 22:05:37 +08:00
except Exception as e:
_top_import_error = e
2011-11-21 04:16:52 +08:00
def test_import_skl():
"""Test either above import has failed for some reason
"import *" is discouraged outside of the module level, hence we
rely on setting up the variable above
"""
assert_equal(_top_import_error, None)