Skip to content

[TA] skip tests which are failing due to service bugs #26838

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

Merged
merged 2 commits into from
Oct 15, 2022
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
Original file line number Diff line number Diff line change
Expand Up @@ -1687,7 +1687,7 @@ def test_healthcare_action(self, client):
assert res.error.code == "InvalidDocument"
else:
assert res.entities
assert res.statistics
# assert res.statistics FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714

@TextAnalyticsPreparer()
@TextAnalyticsClientPreparer()
Expand Down Expand Up @@ -1762,7 +1762,6 @@ def test_cancel_fail_terminal_state(self, client):
polling_interval=self._interval(),
)
poller.result()
assert poller.status() == "succeeded"
with pytest.raises(HttpResponseError):
poller.cancel() # can't cancel when already in terminal state

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,7 @@ async def test_healthcare_action(self, client):
assert res.error.code == "InvalidDocument"
else:
assert res.entities
assert res.statistics
# assert res.statistics FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714

@TextAnalyticsPreparer()
@TextAnalyticsClientPreparer()
Expand Down Expand Up @@ -1876,7 +1876,6 @@ async def test_cancel_fail_terminal_state(self, client):
polling_interval=self._interval(),
)
await poller.result()
assert poller.status() == "succeeded"
with pytest.raises(HttpResponseError):
await poller.cancel() # can't cancel when already in terminal state

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ def test_out_of_order_ids(self, client):
assert not resp.statistics
assert num_error == 1

@pytest.mark.skip("InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714")
@TextAnalyticsPreparer()
@TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"})
@recorded_by_proxy
Expand Down Expand Up @@ -226,8 +227,8 @@ def callback(resp):
if doc.is_error:
num_error += 1
continue
assert doc.statistics.character_count
assert doc.statistics.transaction_count
# assert doc.statistics.character_count FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
# assert doc.statistics.transaction_count FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
assert num_error == 1

@TextAnalyticsPreparer()
Expand Down Expand Up @@ -532,7 +533,7 @@ def test_healthcare_continuation_token(self, client):
assert result.is_error
else:
assert result.id == document_order[doc_idx]
assert result.statistics
# assert result.statistics FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
assert result.entities

initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ async def test_out_of_order_ids(self, client):
assert not resp.statistics
assert num_error == 1

@pytest.mark.skip("InternalServerError: https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714")
@TextAnalyticsPreparer()
@TextAnalyticsClientPreparer(client_kwargs={"api_version": "v3.1"})
@recorded_by_proxy_async
Expand Down Expand Up @@ -252,8 +253,8 @@ def callback(resp):
if doc.is_error:
num_error += 1
continue
assert doc.statistics.character_count
assert doc.statistics.transaction_count
# assert doc.statistics.character_count FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
# assert doc.statistics.transaction_count FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
assert num_error == 1

@TextAnalyticsPreparer()
Expand Down Expand Up @@ -563,7 +564,7 @@ async def test_healthcare_continuation_token(self, client):
assert result.is_error
else:
assert result.id == document_order[doc_idx]
assert result.statistics
# assert result.statistics FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15860714
assert result.entities

await initial_poller.wait() # necessary so azure-devtools doesn't throw assertion error
Expand Down
10 changes: 6 additions & 4 deletions sdk/textanalytics/azure-ai-textanalytics/tests/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ def assertOpinionsEqual(self, opinion_one, opinion_two):
assert opinion_one.is_negated == opinion_two.is_negated

def validateConfidenceScores(self, confidence_scores):
assert confidence_scores.positive is not None
assert confidence_scores.neutral is not None
assert confidence_scores.negative is not None
assert confidence_scores.positive + confidence_scores.neutral + confidence_scores.negative == 1
# FIXME https://dev.azure.com/msazure/Cognitive%20Services/_workitems/edit/15794991
return
# assert confidence_scores.positive is not None
# assert confidence_scores.neutral is not None
# assert confidence_scores.negative is not None
# assert confidence_scores.positive + confidence_scores.neutral + confidence_scores.negative == 1

def assert_healthcare_data_sources_equal(self, data_sources_a, data_sources_b):
assert len(data_sources_a) == len(data_sources_b)
Expand Down