diff --git a/gensim/test/test_keyedvectors.py b/gensim/test/test_keyedvectors.py index e9addfb54c..833fbba54a 100644 --- a/gensim/test/test_keyedvectors.py +++ b/gensim/test/test_keyedvectors.py @@ -17,7 +17,6 @@ from gensim.corpora import Dictionary from gensim.models import KeyedVectors as EuclideanKeyedVectors, WordEmbeddingSimilarityIndex from gensim.test.utils import datapath -from gensim.utils import deprecated logger = logging.getLogger(__name__) @@ -73,7 +72,6 @@ def setUp(self): self.vectors = EuclideanKeyedVectors.load_word2vec_format( datapath('euclidean_vectors.bin'), binary=True, datatype=np.float64) - @deprecated("Method will be removed in 4.0.0") def test_similarity_matrix(self): """Test similarity_matrix returns expected results.""" diff --git a/gensim/test/test_levenshtein.py b/gensim/test/test_levenshtein.py index 88f5485b1d..76d850d1f2 100644 --- a/gensim/test/test_levenshtein.py +++ b/gensim/test/test_levenshtein.py @@ -16,7 +16,6 @@ from gensim.corpora import Dictionary from gensim.similarities import levenshtein, LevenshteinSimilarityIndex -from gensim.utils import deprecated logger = logging.getLogger(__name__) @@ -68,7 +67,6 @@ def test_most_similar(self): class TestLevenshtein(unittest.TestCase): - @deprecated("Method will be removed in 4.0.0") def test_similarity_matrix(self): """Test similarity_matrix returns expected results.""" diff --git a/gensim/test/test_similarities.py b/gensim/test/test_similarities.py index 91f241a26c..20b50c2d94 100644 --- a/gensim/test/test_similarities.py +++ b/gensim/test/test_similarities.py @@ -25,7 +25,6 @@ from gensim.models import Word2Vec, FastText from gensim.test.utils import (datapath, get_tmpfile, common_texts as texts, common_dictionary as dictionary, common_corpus as corpus) -from gensim.utils import deprecated try: from pyemd import emd # noqa:F401 @@ -372,7 +371,6 @@ def testIter(self): class TestSoftCosineSimilarity(unittest.TestCase, _TestSimilarityABC): - @deprecated("Method will be removed in 4.0.0") def setUp(self): self.cls = similarities.SoftCosineSimilarity self.tfidf = TfidfModel(dictionary=dictionary) @@ -381,12 +379,10 @@ def setUp(self): similarity_matrix[dictionary.token2id["human"], dictionary.token2id["user"]] = 0.5 self.similarity_matrix = similarity_matrix.tocsc() - @deprecated("Method will be removed in 4.0.0") def factoryMethod(self): # Override factoryMethod. return self.cls(corpus, self.similarity_matrix) - @deprecated("Method will be removed in 4.0.0") def testFull(self, num_best=None): # Override testFull. @@ -426,7 +422,6 @@ def testFull(self, num_best=None): self.assertTrue(numpy.alltrue(result[i + 1:] >= 0.0)) self.assertTrue(numpy.alltrue(result[i + 1:] < 1.0)) - @deprecated("Method will be removed in 4.0.0") def testNonIncreasing(self): """ Check that similarities are non-increasing when `num_best` is not `None`.""" # NOTE: this could be implemented for other similarities as well (i.e. in _TestSimilarityABC). @@ -440,7 +435,6 @@ def testNonIncreasing(self): cond = sum(numpy.diff(sims2) < 0) == len(sims2) - 1 self.assertTrue(cond) - @deprecated("Method will be removed in 4.0.0") def testChunking(self): # Override testChunking. @@ -460,7 +454,6 @@ def testChunking(self): expected = 1.0 self.assertAlmostEquals(expected, chunk[0][1], places=2) - @deprecated("Method will be removed in 4.0.0") def testIter(self): # Override testIter.