Skip to content

Commit e9bcb44

Browse files
[textanalytics] remove warning tests (Azure#19217)
Suhas confirmed on the teams channel that warnings will not be returned anymore
1 parent 6b6a612 commit e9bcb44

File tree

4 files changed

+0
-105
lines changed

4 files changed

+0
-105
lines changed

sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases.test_document_warnings.yaml

Lines changed: 0 additions & 45 deletions
This file was deleted.

sdk/textanalytics/azure-ai-textanalytics/tests/recordings/test_extract_key_phrases_async.test_document_warnings.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -442,19 +442,6 @@ def test_document_errors(self, client):
442442
self.assertEqual(doc_errors[2].error.code, "InvalidDocument")
443443
self.assertIsNotNone(doc_errors[2].error.message)
444444

445-
@GlobalTextAnalyticsAccountPreparer()
446-
@TextAnalyticsClientPreparer()
447-
def test_document_warnings(self, client):
448-
docs = [
449-
{"id": "1", "text": "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn'tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!"},
450-
]
451-
452-
result = client.extract_key_phrases(docs)
453-
for doc in result:
454-
doc_warnings = doc.warnings
455-
self.assertEqual(doc_warnings[0].code, "LongWordsInDocument")
456-
self.assertIsNotNone(doc_warnings[0].message)
457-
458445
@GlobalTextAnalyticsAccountPreparer()
459446
@TextAnalyticsClientPreparer()
460447
def test_not_passing_list_for_docs(self, client):

sdk/textanalytics/azure-ai-textanalytics/tests/test_extract_key_phrases_async.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -457,19 +457,6 @@ async def test_document_errors(self, client):
457457
self.assertEqual(doc_errors[2].error.code, "InvalidDocument")
458458
self.assertIsNotNone(doc_errors[2].error.message)
459459

460-
@GlobalTextAnalyticsAccountPreparer()
461-
@TextAnalyticsClientPreparer()
462-
async def test_document_warnings(self, client):
463-
docs = [
464-
{"id": "1", "text": "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn'tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!"},
465-
]
466-
467-
result = await client.extract_key_phrases(docs)
468-
for doc in result:
469-
doc_warnings = doc.warnings
470-
self.assertEqual(doc_warnings[0].code, "LongWordsInDocument")
471-
self.assertIsNotNone(doc_warnings[0].message)
472-
473460
@GlobalTextAnalyticsAccountPreparer()
474461
@TextAnalyticsClientPreparer()
475462
async def test_not_passing_list_for_docs(self, client):

0 commit comments

Comments
 (0)