Skip to content

Commit

Permalink
Remove @deprecated annotation from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Witiko committed Apr 11, 2018
1 parent 143afa6 commit 190bf91
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions gensim/test/test_keyedvectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down Expand Up @@ -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."""

Expand Down
2 changes: 0 additions & 2 deletions gensim/test/test_levenshtein.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@

from gensim.corpora import Dictionary
from gensim.similarities import levenshtein, LevenshteinSimilarityIndex
from gensim.utils import deprecated

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -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."""

Expand Down
7 changes: 0 additions & 7 deletions gensim/test/test_similarities.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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.

Expand Down Expand Up @@ -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).
Expand All @@ -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.

Expand All @@ -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.

Expand Down

0 comments on commit 190bf91

Please sign in to comment.