Skip to content

Commit

Permalink
Skip test if scikit-learn not installed (#1350)
Browse files Browse the repository at this point in the history
  • Loading branch information
souravsingh authored and tmylk committed May 22, 2017
1 parent b5417af commit 80cc564
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions gensim/test/test_sklearn_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@
import pickle

from scipy import sparse
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.datasets import load_files
from sklearn import linear_model
try:
from sklearn.pipeline import Pipeline
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.datasets import load_files
from sklearn import linear_model
except:
raise unittest.SkipTest("Test requires scikit-learn to be installed, which is not available")

from gensim.sklearn_integration.sklearn_wrapper_gensim_ldamodel import SklearnWrapperLdaModel
from gensim.sklearn_integration.sklearn_wrapper_gensim_lsimodel import SklearnWrapperLsiModel
from gensim.corpora import Dictionary
Expand Down

0 comments on commit 80cc564

Please sign in to comment.