From 2d270d23ad7d8ed6c2a1dd55319c47ebfbbdc768 Mon Sep 17 00:00:00 2001 From: Tobias Waslowski Date: Thu, 20 Jun 2024 17:51:11 +0200 Subject: [PATCH] Remove obsolete smoke test Language detection is no longer performed for syntactical analysis --- lingolift/nlp/syntactical_analysis.py | 1 - test/smoketest.py | 11 ----------- 2 files changed, 12 deletions(-) diff --git a/lingolift/nlp/syntactical_analysis.py b/lingolift/nlp/syntactical_analysis.py index f9560c6..f442280 100644 --- a/lingolift/nlp/syntactical_analysis.py +++ b/lingolift/nlp/syntactical_analysis.py @@ -10,7 +10,6 @@ from spacy.tokens.token import Token - def perform_analysis(sentence: str) -> list[SyntacticalAnalysis]: """ Performs a syntactical analysis on a sentence in a given language. diff --git a/test/smoketest.py b/test/smoketest.py index 8f135f2..ff1b0ff 100644 --- a/test/smoketest.py +++ b/test/smoketest.py @@ -4,7 +4,6 @@ from shared.client import Client from shared.exception import ( ApplicationException, - LanguageNotIdentifiedException, SentenceTooLongException, ) @@ -43,16 +42,6 @@ async def test_syntactical_analysis_endpoint(): assert len(analysis) > 0 -@pytest.mark.asyncio -async def test_syntactical_analysis_error_message_for_invalid_language(): - sentence = "Det er en norsk setning" - with pytest.raises(ApplicationException) as e: - await client.fetch_syntactical_analysis(sentence) - # Only a small subset of languages can be identified. This is dependent on the languages the - # language detector is configured to recognize. Currently, Norwegian simply will not be identified properly. - assert e.value.error_message == LanguageNotIdentifiedException().error_message - - @pytest.mark.asyncio async def test_response_suggestions_endpoint(): suggestions = await client.fetch_response_suggestions("Donde esta la biblioteca?")