From 5e85f79c8150d5382c3a3485e47ce4381570aee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Perceval=20Wajsb=C3=BCrt?= Date: Mon, 7 Aug 2023 15:46:18 +0200 Subject: [PATCH] test: skip umls test if no api key (e.g. third-party PR) --- tests/pipelines/ner/test_umls.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/pipelines/ner/test_umls.py b/tests/pipelines/ner/test_umls.py index 2d4ca67ec..1abee3450 100644 --- a/tests/pipelines/ner/test_umls.py +++ b/tests/pipelines/ner/test_umls.py @@ -18,6 +18,7 @@ pattern_config = {"lang": ["FRE"], "sources": ["MSHFRE"]} +@pytest.mark.skipif(not os.getenv("UMLS_API_KEY"), reason="No UMLS_API_KEY given") def test_get_patterns(): path, _, _ = get_path(pattern_config) @@ -41,6 +42,7 @@ def test_get_patterns(): assert len(patterns) == 48587 +@pytest.mark.skipif(not os.getenv("UMLS_API_KEY"), reason="No UMLS_API_KEY given") def test_add_pipe(blank_nlp: Language): path, _, _ = get_path(pattern_config) if not path.exists():