2011-01-18 23:22:20 +08:00
|
|
|
# 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
|
2011-01-18 23:22:20 +08:00
|
|
|
|
|
|
|
|
try:
|
2011-09-02 17:00:02 +08:00
|
|
|
from sklearn import *
|
2011-01-18 23:22:20 +08:00
|
|
|
_top_import_error = None
|
2011-12-11 22:05:37 +08:00
|
|
|
except Exception as e:
|
2011-01-18 23:22:20 +08:00
|
|
|
_top_import_error = e
|
|
|
|
|
|
2011-11-21 04:16:52 +08:00
|
|
|
|
2011-01-18 23:22:20 +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)
|