Skip to content

Commit

Permalink
Merge branch 'smartirs' of github.com:markroxor/gensim into smartirs
Browse files Browse the repository at this point in the history
  • Loading branch information
markroxor committed Dec 22, 2017
2 parents 0bacc08 + 5b2d37a commit fb055e0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gensim/test/test_sklearn_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -973,13 +973,13 @@ def testTransform(self):

def testSetGetParams(self):
# updating only one param
self.model.set_params(normalize=False)
self.model.set_params(smartirs='nnn')
model_params = self.model.get_params()
self.assertEqual(model_params["normalize"], False)
self.assertEqual(model_params["smartirs"], 'nnn')

# verify that the attributes values are also changed for `gensim_model` after fitting
self.model.fit(self.corpus)
self.assertEqual(getattr(self.model.gensim_model, 'normalize'), False)
self.assertEqual(getattr(self.model.gensim_model, 'smartirs'), 'nnn')

def testPipeline(self):
with open(datapath('mini_newsgroup'), 'rb') as f:
Expand Down
1 change: 0 additions & 1 deletion gensim/test/test_tfidfmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
class TestTfidfModel(unittest.TestCase):
def setUp(self):
self.corpus = MmCorpus(datapath('testcorpus.mm'))
self.model = tfidfmodel.TfidfModel(self.corpus, normalize=True)

def testTransform(self):
# create the transformation model
Expand Down

0 comments on commit fb055e0

Please sign in to comment.