Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[textanalytics] remove warning tests #19217

Merged
1 commit merged into from
Jun 11, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

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