test_init.py 470 B

1234567891011121314151617181920
  1. # Basic unittests to test functioning of module's top-level
  2. __author__ = "Yaroslav Halchenko"
  3. __license__ = "BSD"
  4. try:
  5. from sklearn import * # noqa
  6. _top_import_error = None
  7. except Exception as e:
  8. _top_import_error = e
  9. def test_import_skl():
  10. # Test either above import has failed for some reason
  11. # "import *" is discouraged outside of the module level, hence we
  12. # rely on setting up the variable above
  13. assert _top_import_error is None