Skip to content

Commit 9c09d43

Browse files
lint fix
1 parent 1296021 commit 9c09d43

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

toolium/test/utils/ai_utils/test_text_analysis.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,22 +52,21 @@ def configure_default_openai_model():
5252
@pytest.mark.parametrize('input_text, features_list, expected_low, expected_high', get_analysis_examples)
5353
def test_get_text_analysis(input_text, features_list, expected_low, expected_high):
5454
similarity = json.loads(get_text_criteria_analysis_openai(input_text, features_list, azure=True))
55-
assert expected_low <= similarity['overall_match'] <= expected_high,\
56-
f"Overall match {similarity['overall_match']} not in range"
55+
assert expected_low <= similarity['overall_match'] <= expected_high
5756

5857

5958
extra_task = """
6059
Additional task:
6160
6261
Extract all verbs from the input text and add them to the JSON under data.verbs.
63-
62+
6463
Rules:
6564
- Use the same language as the input text.
6665
- Return verbs in their base/infinitive form when possible.
6766
- Do not repeat verbs (no duplicates).
6867
- Preserve the order in which they first appear in the text.
6968
- Verbs should be in this base/infinitive form.
70-
69+
7170
The data field must include:
7271
"data": {
7372
"verbs": [ "<verb1>", "<verb2>", ... ]
@@ -83,6 +82,7 @@ def test_get_text_analysis(input_text, features_list, expected_low, expected_hig
8382
('Oops I did it again', ["is a greeting phrase", "is a question"], ['do'])
8483
)
8584

85+
8686
@pytest.mark.skipif(os.getenv("AZURE_OPENAI_API_KEY") is None,
8787
reason="AZURE_OPENAI_API_KEY environment variable not set")
8888
@pytest.mark.parametrize('input_text, features_list, verb_list', get_extra_examples)
@@ -102,7 +102,7 @@ def test_get_text_analysis_extra_features(input_text, features_list, verb_list):
102102
)
103103

104104

105-
# @pytest.mark.skip(reason='Sentence Transformers model is not available in the CI environment')
105+
@pytest.mark.skip(reason='Sentence Transformers model is not available in the CI environment')
106106
@pytest.mark.parametrize('input_text, features_list, expected_low, expected_high', examples_sentence_transformers)
107107
def test_get_text_analysis_sentence_transformers(input_text, features_list, expected_low, expected_high):
108108
similarity = get_text_criteria_analysis_sentence_transformers(input_text, features_list)

0 commit comments

Comments
 (0)