diff --git a/google/cloud/dialogflowcx_v3/services/agents/async_client.py b/google/cloud/dialogflowcx_v3/services/agents/async_client.py index 77637f6c..1e567595 100644 --- a/google/cloud/dialogflowcx_v3/services/agents/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/agents/async_client.py @@ -1508,7 +1508,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AgentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py b/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py index 97c9b2d1..9a4468ed 100644 --- a/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/changelogs/async_client.py @@ -699,7 +699,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ChangelogsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/deployments/async_client.py b/google/cloud/dialogflowcx_v3/services/deployments/async_client.py index 15675b63..1ffcfe89 100644 --- a/google/cloud/dialogflowcx_v3/services/deployments/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/deployments/async_client.py @@ -720,7 +720,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DeploymentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py b/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py index 365d21a4..33f4350c 100644 --- a/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/entity_types/async_client.py @@ -1133,7 +1133,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EntityTypesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/environments/async_client.py b/google/cloud/dialogflowcx_v3/services/environments/async_client.py index d507dbf2..99c4fb9a 100644 --- a/google/cloud/dialogflowcx_v3/services/environments/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/environments/async_client.py @@ -1594,7 +1594,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EnvironmentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/experiments/async_client.py b/google/cloud/dialogflowcx_v3/services/experiments/async_client.py index adfc4a5c..2653bbdf 100644 --- a/google/cloud/dialogflowcx_v3/services/experiments/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/experiments/async_client.py @@ -1252,7 +1252,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ExperimentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/flows/async_client.py b/google/cloud/dialogflowcx_v3/services/flows/async_client.py index f34f435c..76546d21 100644 --- a/google/cloud/dialogflowcx_v3/services/flows/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/flows/async_client.py @@ -1648,7 +1648,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "FlowsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/intents/async_client.py b/google/cloud/dialogflowcx_v3/services/intents/async_client.py index c63bfdf6..fb44bd8f 100644 --- a/google/cloud/dialogflowcx_v3/services/intents/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/intents/async_client.py @@ -1048,7 +1048,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "IntentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/pages/async_client.py b/google/cloud/dialogflowcx_v3/services/pages/async_client.py index ef75f45b..167fc6c9 100644 --- a/google/cloud/dialogflowcx_v3/services/pages/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/pages/async_client.py @@ -1099,7 +1099,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PagesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py b/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py index 7b3ef3ac..d607ac91 100644 --- a/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/security_settings_service/async_client.py @@ -1085,7 +1085,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SecuritySettingsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py b/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py index c6d4e39c..77dfb46e 100644 --- a/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/session_entity_types/async_client.py @@ -1123,7 +1123,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SessionEntityTypesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/sessions/async_client.py b/google/cloud/dialogflowcx_v3/services/sessions/async_client.py index 9afbf9a8..e879a696 100644 --- a/google/cloud/dialogflowcx_v3/services/sessions/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/sessions/async_client.py @@ -939,7 +939,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SessionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py b/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py index 918b00f6..160348d6 100644 --- a/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/test_cases/async_client.py @@ -1770,7 +1770,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TestCasesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py b/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py index 2f40511e..89c52b13 100644 --- a/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/transition_route_groups/async_client.py @@ -1092,7 +1092,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TransitionRouteGroupsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/versions/async_client.py b/google/cloud/dialogflowcx_v3/services/versions/async_client.py index f8e99aa1..ca369feb 100644 --- a/google/cloud/dialogflowcx_v3/services/versions/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/versions/async_client.py @@ -1304,7 +1304,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VersionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py b/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py index da300543..b45e3597 100644 --- a/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py @@ -1039,7 +1039,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "WebhooksAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py index ccfbbd6e..3f920320 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/agents/async_client.py @@ -1510,7 +1510,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "AgentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py index b9ab0e55..fe8b161c 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/changelogs/async_client.py @@ -699,7 +699,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ChangelogsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py index b040acb6..017dcbca 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/deployments/async_client.py @@ -720,7 +720,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "DeploymentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py index 1c12dca9..b7cf43f7 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/entity_types/async_client.py @@ -1129,7 +1129,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EntityTypesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py index ede9bc7b..05422736 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/environments/async_client.py @@ -1594,7 +1594,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "EnvironmentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py index f43e45cb..b34f88cc 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/experiments/async_client.py @@ -1254,7 +1254,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "ExperimentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py index ff322409..3733ab55 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/flows/async_client.py @@ -1650,7 +1650,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "FlowsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py index e412e287..98b74e89 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/intents/async_client.py @@ -1048,7 +1048,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "IntentsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py index 3a0ffa5d..7c53951f 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/pages/async_client.py @@ -1089,7 +1089,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "PagesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py index 500ffaf8..b4a1505f 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/security_settings_service/async_client.py @@ -1085,7 +1085,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SecuritySettingsServiceAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py index 3b463a51..6ccb90d3 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/session_entity_types/async_client.py @@ -1126,7 +1126,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SessionEntityTypesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py index 0114e9ab..df80ed63 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/sessions/async_client.py @@ -939,7 +939,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "SessionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py index a8b03086..6a9da18e 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/test_cases/async_client.py @@ -1770,7 +1770,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TestCasesAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py index 076215fa..5d361226 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/transition_route_groups/async_client.py @@ -1092,7 +1092,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "TransitionRouteGroupsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py index ee5ffa14..259f5615 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/versions/async_client.py @@ -1307,7 +1307,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "VersionsAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py b/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py index c5ea28fd..c90c3439 100644 --- a/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py +++ b/google/cloud/dialogflowcx_v3beta1/services/webhooks/async_client.py @@ -1039,7 +1039,7 @@ async def list_locations( # Done; return the response. return response - async def __aenter__(self): + async def __aenter__(self) -> "WebhooksAsyncClient": return self async def __aexit__(self, exc_type, exc, tb): diff --git a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3.json b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3.json index 199208fd..4fe8e9ba 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow-cx", - "version": "1.23.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json index 7444200a..bddeff21 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.cx.v3beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow-cx", - "version": "1.23.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/tests/unit/gapic/dialogflowcx_v3/test_agents.py b/tests/unit/gapic/dialogflowcx_v3/test_agents.py index acd949ca..2eb5f44a 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_agents.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_agents.py @@ -1089,9 +1089,11 @@ async def test_list_agents_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_agents(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py b/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py index dbfe6e1d..ca427028 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_changelogs.py @@ -1099,9 +1099,11 @@ async def test_list_changelogs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_changelogs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_deployments.py b/tests/unit/gapic/dialogflowcx_v3/test_deployments.py index e666a063..8435c16a 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_deployments.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_deployments.py @@ -1099,9 +1099,11 @@ async def test_list_deployments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_deployments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py b/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py index 292c5229..a7c79cd3 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_entity_types.py @@ -1122,9 +1122,11 @@ async def test_list_entity_types_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_entity_types(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_environments.py b/tests/unit/gapic/dialogflowcx_v3/test_environments.py index 38dfa1e8..af246c45 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_environments.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_environments.py @@ -1140,9 +1140,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2559,9 +2561,11 @@ async def test_lookup_environment_history_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.lookup_environment_history(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3156,9 +3160,11 @@ async def test_list_continuous_test_results_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_continuous_test_results(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_experiments.py b/tests/unit/gapic/dialogflowcx_v3/test_experiments.py index c31364ae..062e2264 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_experiments.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_experiments.py @@ -1102,9 +1102,11 @@ async def test_list_experiments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_experiments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_flows.py b/tests/unit/gapic/dialogflowcx_v3/test_flows.py index 3d8ae30b..083d49b2 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_flows.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_flows.py @@ -1560,9 +1560,11 @@ async def test_list_flows_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_flows(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_intents.py b/tests/unit/gapic/dialogflowcx_v3/test_intents.py index 6b70c3c9..74e5e834 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_intents.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_intents.py @@ -1079,9 +1079,11 @@ async def test_list_intents_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_intents(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_pages.py b/tests/unit/gapic/dialogflowcx_v3/test_pages.py index 5c2b3c28..0f42da0f 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_pages.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_pages.py @@ -1082,9 +1082,11 @@ async def test_list_pages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_pages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py b/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py index 0258d812..baf0b239 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_security_settings_service.py @@ -2112,9 +2112,11 @@ async def test_list_security_settings_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_security_settings(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py b/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py index e91a1e54..b6c897e7 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_session_entity_types.py @@ -1187,9 +1187,11 @@ async def test_list_session_entity_types_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_session_entity_types(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py b/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py index a63c96c2..aa6c7ebd 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_test_cases.py @@ -1112,9 +1112,11 @@ async def test_list_test_cases_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_test_cases(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2424,9 +2426,6 @@ def test_calculate_coverage(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = test_case.CalculateCoverageResponse( agent="agent_value", - intent_coverage=test_case.IntentCoverage( - intents=[test_case.IntentCoverage.Intent(intent="intent_value")] - ), ) response = client.calculate_coverage(request) @@ -3305,9 +3304,11 @@ async def test_list_test_case_results_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_test_case_results(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6290,9 +6291,6 @@ def test_calculate_coverage_rest(request_type): # Designate an appropriate value for the returned response. return_value = test_case.CalculateCoverageResponse( agent="agent_value", - intent_coverage=test_case.IntentCoverage( - intents=[test_case.IntentCoverage.Intent(intent="intent_value")] - ), ) # Wrap the value into a proper Response obj diff --git a/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py b/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py index 47473728..09384582 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_transition_route_groups.py @@ -1207,9 +1207,11 @@ async def test_list_transition_route_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_transition_route_groups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_versions.py b/tests/unit/gapic/dialogflowcx_v3/test_versions.py index 452c887d..07a9f2cf 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_versions.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_versions.py @@ -1096,9 +1096,11 @@ async def test_list_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py b/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py index 000db9fd..eceda159 100644 --- a/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py +++ b/tests/unit/gapic/dialogflowcx_v3/test_webhooks.py @@ -1089,9 +1089,11 @@ async def test_list_webhooks_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_webhooks(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1121,7 +1123,6 @@ def test_get_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.get_webhook(request) @@ -1358,7 +1359,6 @@ def test_create_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.create_webhook(request) @@ -1609,7 +1609,6 @@ def test_update_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.update_webhook(request) @@ -2414,7 +2413,6 @@ def test_get_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj @@ -2701,7 +2699,6 @@ def test_create_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj @@ -3021,7 +3018,6 @@ def test_update_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py index e50cbfb7..587e11ab 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_agents.py @@ -1089,9 +1089,11 @@ async def test_list_agents_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_agents(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py index 49bbeda0..7f9bc01a 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_changelogs.py @@ -1099,9 +1099,11 @@ async def test_list_changelogs_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_changelogs(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py index d6267084..05b08739 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_deployments.py @@ -1101,9 +1101,11 @@ async def test_list_deployments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_deployments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py index 910af343..cc3146c6 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_entity_types.py @@ -1124,9 +1124,11 @@ async def test_list_entity_types_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_entity_types(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py index d07199b0..698a707c 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_environments.py @@ -1142,9 +1142,11 @@ async def test_list_environments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_environments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2561,9 +2563,11 @@ async def test_lookup_environment_history_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.lookup_environment_history(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -3158,9 +3162,11 @@ async def test_list_continuous_test_results_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_continuous_test_results(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py index 2fbc1e15..365b4f1f 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_experiments.py @@ -1104,9 +1104,11 @@ async def test_list_experiments_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_experiments(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py index f1fe3715..dd9efaef 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_flows.py @@ -1560,9 +1560,11 @@ async def test_list_flows_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_flows(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py index 4dac57be..c8692ad0 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_intents.py @@ -1079,9 +1079,11 @@ async def test_list_intents_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_intents(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py index f0dbc2ab..486c0bef 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_pages.py @@ -1082,9 +1082,11 @@ async def test_list_pages_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_pages(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py index bb266975..b299c411 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_security_settings_service.py @@ -2114,9 +2114,11 @@ async def test_list_security_settings_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_security_settings(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py index d491ee03..251e01be 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_session_entity_types.py @@ -1187,9 +1187,11 @@ async def test_list_session_entity_types_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_session_entity_types(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py index 016088fe..aa2deb3b 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_test_cases.py @@ -1112,9 +1112,11 @@ async def test_list_test_cases_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_test_cases(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -2424,9 +2426,6 @@ def test_calculate_coverage(request_type, transport: str = "grpc"): # Designate an appropriate return value for the call. call.return_value = test_case.CalculateCoverageResponse( agent="agent_value", - intent_coverage=test_case.IntentCoverage( - intents=[test_case.IntentCoverage.Intent(intent="intent_value")] - ), ) response = client.calculate_coverage(request) @@ -3305,9 +3304,11 @@ async def test_list_test_case_results_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_test_case_results(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -6290,9 +6291,6 @@ def test_calculate_coverage_rest(request_type): # Designate an appropriate value for the returned response. return_value = test_case.CalculateCoverageResponse( agent="agent_value", - intent_coverage=test_case.IntentCoverage( - intents=[test_case.IntentCoverage.Intent(intent="intent_value")] - ), ) # Wrap the value into a proper Response obj diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py index 0abc8f46..50b2bba1 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_transition_route_groups.py @@ -1209,9 +1209,11 @@ async def test_list_transition_route_groups_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_transition_route_groups(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py index cd23e8ee..95f1ef58 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_versions.py @@ -1096,9 +1096,11 @@ async def test_list_versions_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_versions(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token diff --git a/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py b/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py index bdcb2bf4..787f9684 100644 --- a/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py +++ b/tests/unit/gapic/dialogflowcx_v3beta1/test_webhooks.py @@ -1089,9 +1089,11 @@ async def test_list_webhooks_async_pages(): RuntimeError, ) pages = [] - async for page_ in ( + # Workaround issue in python 3.9 related to code coverage by adding `# pragma: no branch` + # See https://github.com/googleapis/gapic-generator-python/pull/1174#issuecomment-1025132372 + async for page_ in ( # pragma: no branch await client.list_webhooks(request={}) - ).pages: # pragma: no branch + ).pages: pages.append(page_) for page_, token in zip(pages, ["abc", "def", "ghi", ""]): assert page_.raw_page.next_page_token == token @@ -1121,7 +1123,6 @@ def test_get_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.get_webhook(request) @@ -1358,7 +1359,6 @@ def test_create_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.create_webhook(request) @@ -1609,7 +1609,6 @@ def test_update_webhook(request_type, transport: str = "grpc"): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) response = client.update_webhook(request) @@ -2414,7 +2413,6 @@ def test_get_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj @@ -2701,7 +2699,6 @@ def test_create_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj @@ -3021,7 +3018,6 @@ def test_update_webhook_rest(request_type): name="name_value", display_name="display_name_value", disabled=True, - generic_web_service=gcdc_webhook.Webhook.GenericWebService(uri="uri_value"), ) # Wrap the value into a proper Response obj