Skip to content

Commit

Permalink
Fixes test docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
jayantj committed Mar 8, 2018
1 parent 4d90979 commit 633520b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gensim/test/test_poincare.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def test_persistence_separate_file(self):
self.models_equal(model, loaded)

def test_train_after_load(self):
"""Tests whether the model is saved and loaded correctly."""
"""Tests whether the model can be trained correctly after loading from disk."""
model = PoincareModel(self.data, burn_in=0, negative=3)
model.train(epochs=1)
model.save(testfile())
Expand All @@ -104,15 +104,15 @@ def test_train_after_load(self):
self.models_equal(model, loaded)

def test_persistence_old_model(self):
"""Tests whether the model is saved and loaded correctly."""
"""Tests whether model from older gensim version is loaded correctly."""
loaded = PoincareModel.load(datapath('poincare_test_3.4.0'))
self.assertEqual(loaded.kv.syn0.shape, (239, 2))
self.assertEqual(len(loaded.kv.vocab), 239)
self.assertEqual(loaded.size, 2)
self.assertEqual(len(loaded.all_relations), 200)

def test_train_old_model_after_load(self):
"""Tests whether the model is saved and loaded correctly."""
"""Tests whether loaded model from older gensim version can be trained correctly."""
loaded = PoincareModel.load(datapath('poincare_test_3.4.0'))
old_vectors = np.copy(loaded.kv.syn0)
loaded.train(epochs=2)
Expand Down

0 comments on commit 633520b

Please sign in to comment.