Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 269350c

Browse files
committed
Revert "test: add tests for autogen-snippets option (#1055)"
This reverts commit 185ecc7.
1 parent 89bc432 commit 269350c

1 file changed

Lines changed: 3 additions & 20 deletions

File tree

tests/unit/generator/test_options.py

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ def test_options_service_config(fs):
141141

142142

143143
def test_options_bool_flags():
144-
# Most options are default False.
144+
# All these options are default False.
145+
# If new options violate this assumption,
146+
# this test may need to be tweaked.
145147
# New options should follow the dash-case/snake_case convention.
146148
opt_str_to_attr_name = {
147149
name: re.sub(r"-", "_", name)
@@ -159,22 +161,3 @@ def test_options_bool_flags():
159161

160162
options = Options.build(opt)
161163
assert getattr(options, attr)
162-
163-
# Check autogen-snippets separately, as it is default True
164-
options = Options.build("")
165-
assert options.autogen_snippets
166-
167-
options = Options.build("autogen-snippets=False")
168-
assert not options.autogen_snippets
169-
170-
171-
def test_options_autogen_snippets_false_for_old_naming():
172-
# NOTE: Snippets are not currently correct for the alternative (Ads) templates
173-
# so always disable snippetgen in that case
174-
# https://github.com/googleapis/gapic-generator-python/issues/1052
175-
options = Options.build("old-naming")
176-
assert not options.autogen_snippets
177-
178-
# Even if autogen-snippets is set to True, do not enable snippetgen
179-
options = Options.build("old-naming,autogen-snippets=True")
180-
assert not options.autogen_snippets

0 commit comments

Comments
 (0)