Skip to content

Commit

Permalink
[textanalytics] remove warning tests (Azure#19217)
Browse files Browse the repository at this point in the history
Suhas confirmed on the teams channel that warnings will not be returned anymore
  • Loading branch information
kristapratico authored Jun 11, 2021
1 parent 6b6a612 commit e9bcb44
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 105 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -442,19 +442,6 @@ def test_document_errors(self, client):
self.assertEqual(doc_errors[2].error.code, "InvalidDocument")
self.assertIsNotNone(doc_errors[2].error.message)

@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
def test_document_warnings(self, client):
docs = [
{"id": "1", "text": "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn'tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!"},
]

result = client.extract_key_phrases(docs)
for doc in result:
doc_warnings = doc.warnings
self.assertEqual(doc_warnings[0].code, "LongWordsInDocument")
self.assertIsNotNone(doc_warnings[0].message)

@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
def test_not_passing_list_for_docs(self, client):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -457,19 +457,6 @@ async def test_document_errors(self, client):
self.assertEqual(doc_errors[2].error.code, "InvalidDocument")
self.assertIsNotNone(doc_errors[2].error.message)

@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
async def test_document_warnings(self, client):
docs = [
{"id": "1", "text": "Thisisaveryveryverylongtextwhichgoesonforalongtimeandwhichalmostdoesn'tseemtostopatanygivenpointintime.ThereasonforthistestistotryandseewhathappenswhenwesubmitaveryveryverylongtexttoLanguage.Thisshouldworkjustfinebutjustincaseitisalwaysgoodtohaveatestcase.ThisallowsustotestwhathappensifitisnotOK.Ofcourseitisgoingtobeokbutthenagainitisalsobettertobesure!"},
]

result = await client.extract_key_phrases(docs)
for doc in result:
doc_warnings = doc.warnings
self.assertEqual(doc_warnings[0].code, "LongWordsInDocument")
self.assertIsNotNone(doc_warnings[0].message)

@GlobalTextAnalyticsAccountPreparer()
@TextAnalyticsClientPreparer()
async def test_not_passing_list_for_docs(self, client):
Expand Down

0 comments on commit e9bcb44

Please sign in to comment.