From bc1b7e7c4499e499d6adcaf87ad72620beb161ca Mon Sep 17 00:00:00 2001 From: nsantacruz Date: Fri, 20 May 2022 11:20:03 +0300 Subject: [PATCH] mark all linker tests and avoid running them on pytestpods while they dont have access to linker models --- build/ci/pyTestPod.yaml | 2 +- sefaria/model/tests/ref_part_test.py | 2 +- sefaria/pytest.ini | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/build/ci/pyTestPod.yaml b/build/ci/pyTestPod.yaml index d618a265e3..293df02d25 100644 --- a/build/ci/pyTestPod.yaml +++ b/build/ci/pyTestPod.yaml @@ -20,7 +20,7 @@ spec: image: "${WEB_IMAGE_NAME}:${WEB_IMAGE_TAG}" imagePullPolicy: Always command: ["bash"] - args: ["-c", "pip3 install pytest-django; pytest -v -m \"not deep and not failing\" ./sefaria; echo $? > /dev/stdout; exit 0;"] + args: ["-c", "pip3 install pytest-django; pytest -v -m \"not deep and not failing and not linker\" ./sefaria; echo $? > /dev/stdout; exit 0;"] env: # WEB_CONCURRENCY is used for determining the number of server workers - name: GOOGLE_APPLICATION_CREDENTIALS diff --git a/sefaria/model/tests/ref_part_test.py b/sefaria/model/tests/ref_part_test.py index c2c28119da..23b99552c8 100644 --- a/sefaria/model/tests/ref_part_test.py +++ b/sefaria/model/tests/ref_part_test.py @@ -9,7 +9,7 @@ from spacy.language import Language from sefaria.model import schema - +pytestmark = pytest.mark.linker ref_resolver = library.get_ref_resolver() diff --git a/sefaria/pytest.ini b/sefaria/pytest.ini index 90abc913dd..6cc1700067 100644 --- a/sefaria/pytest.ini +++ b/sefaria/pytest.ini @@ -2,6 +2,7 @@ markers = deep: marks tests as slow failing: marks tests as known no passing + linker: marks all tests relating to linker v3. linker tests require access to linker ML models so these tests should de deslected in environments that dont have access to these models. DJANGO_SETTINGS_MODULE = sefaria.settings python_files =