From a3c909f34f99aa341230f70a5431c44ad7b027f4 Mon Sep 17 00:00:00 2001 From: Michael Penkov Date: Fri, 18 Mar 2022 22:20:34 +0900 Subject: [PATCH] re-enable tests, increase tolerance --- .github/workflows/build-wheels.yml | 8 ++++++-- gensim/test/test_word2vec.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index 07f88d72fe..ff304ea1c7 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -217,8 +217,12 @@ jobs: # This part relies on the wheel containing tests and required data. # If we remove that from the wheel, we'll need to rewrite this step. # - # pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim + pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim + # + # We need a separate testing step for windows because the command for + # activating the virtual environment is slightly different + # - name: Install and Test Wheel (Windows) if: matrix.os == 'windows-latest' run: | @@ -227,7 +231,7 @@ jobs: pip install wheelhouse/*.whl cd test_environment python -c 'import gensim;print(gensim.__version__)' - # pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim + pytest -rfxEXs --durations=20 --disable-warnings --showlocals --pyargs gensim - name: Upload wheels to s3://gensim-wheels # diff --git a/gensim/test/test_word2vec.py b/gensim/test/test_word2vec.py index 71996ca981..56a1ecfae0 100644 --- a/gensim/test/test_word2vec.py +++ b/gensim/test/test_word2vec.py @@ -834,7 +834,7 @@ def test_parallel(self): # the exact vectors and therefore similarities may differ, due to different thread collisions/randomization # so let's test only for top10 neighbor_rank = [word for word, sim in sims].index(expected_neighbor) - self.assertLess(neighbor_rank, 2) + self.assertLess(neighbor_rank, 3) def test_r_n_g(self): """Test word2vec results identical with identical RNG seed."""