Skip to content
This repository has been archived by the owner on Dec 31, 2023. It is now read-only.

chore: Update gapic-generator-python to v1.11.8 #514

Merged
merged 2 commits into from
Oct 18, 2023
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 @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-automl",
"version": "2.11.3"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-automl",
"version": "2.11.3"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
36 changes: 24 additions & 12 deletions tests/unit/gapic/automl_v1/test_auto_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5780,7 +5780,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -5793,7 +5794,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["dataset"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["dataset"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -5816,7 +5818,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -6745,7 +6748,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -6758,7 +6762,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["dataset"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["dataset"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -6781,7 +6786,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -8218,7 +8224,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -8231,7 +8238,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["model"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["model"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -8254,7 +8262,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -9456,7 +9465,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -9469,7 +9479,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["model"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["model"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -9492,7 +9503,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down
45 changes: 30 additions & 15 deletions tests/unit/gapic/automl_v1beta1/test_auto_ml.py
Original file line number Diff line number Diff line change
Expand Up @@ -7662,7 +7662,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -7675,7 +7676,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["dataset"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["dataset"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -7698,7 +7700,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -8653,7 +8656,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -8666,7 +8670,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["dataset"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["dataset"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -8689,7 +8694,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -10729,7 +10735,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -10742,7 +10749,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["table_spec"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["table_spec"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -10765,7 +10773,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -11746,7 +11755,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -11759,7 +11769,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["column_spec"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["column_spec"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -11782,7 +11793,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down Expand Up @@ -12180,7 +12192,8 @@ def get_message_fields(field):

if is_field_type_proto_plus_type:
message_fields = field.message.meta.fields.values()
else:
# Add `# pragma: NO COVER` because there may not be any `*_pb2` field types
else: # pragma: NO COVER
message_fields = field.message.DESCRIPTOR.fields
return message_fields

Expand All @@ -12193,7 +12206,8 @@ def get_message_fields(field):
subfields_not_in_runtime = []

# For each item in the sample request, create a list of sub fields which are not present at runtime
for field, value in request_init["model"].items():
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for field, value in request_init["model"].items(): # pragma: NO COVER
result = None
is_repeated = False
# For repeated fields
Expand All @@ -12216,7 +12230,8 @@ def get_message_fields(field):
)

# Remove fields from the sample request which are not present in the runtime version of the dependency
for subfield_to_delete in subfields_not_in_runtime:
# Add `# pragma: NO COVER` because this test code will not run if all subfields are present at runtime
for subfield_to_delete in subfields_not_in_runtime: # pragma: NO COVER
field = subfield_to_delete.get("field")
field_repeated = subfield_to_delete.get("is_repeated")
subfield = subfield_to_delete.get("subfield")
Expand Down