Skip to content

Commit e047593

Browse files
committed
test(schema): add unit test for Service.has_auto_populated_fields to reach 100% statement and branch coverage
1 parent e09ddec commit e047593

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

packages/gapic-generator/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
author="Google LLC",
6262
author_email="googleapis-packages@google.com",
6363
license="Apache-2.0",
64-
packages=setuptools.find_namespace_packages(exclude=["docs", "tests"]),
64+
packages=setuptools.find_namespace_packages(exclude=["docs*", "tests*"]),
6565
url=url,
6666
classifiers=[
6767
release_status,

packages/gapic-generator/tests/unit/schema/wrappers/test_service.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -749,3 +749,9 @@ def test_resource_messages_raises_on_malformed_typeless_resource():
749749
# 2. Trigger the property and expect it to fail fast with the AIP-123 URL
750750
with pytest.raises(ValueError, match="https://google.aip.dev/123"):
751751
_ = service.resource_messages
752+
753+
754+
def test_service_has_auto_populated_fields():
755+
service = make_service(name="ThingDoer")
756+
assert not service.has_auto_populated_fields
757+

0 commit comments

Comments
 (0)