Skip to content

Commit 97fc23a

Browse files
jawwad-aliclaude
andcommitted
test(presets): drop the redundant empty-list templates test
Address review feedback: the added test duplicated the pre-existing test_no_templates_provided -- both set provides.templates to [] and assert the same "must provide at least one template" error. That test already guards the empty-list result of the type-before-emptiness ordering, so keeping mine only added maintenance. Left a pointer comment where it was. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 7612936 commit 97fc23a

1 file changed

Lines changed: 4 additions & 11 deletions

File tree

‎tests/test_presets.py‎

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -218,17 +218,10 @@ def test_non_list_templates_raises_validation_error(
218218
with pytest.raises(PresetValidationError, match="templates.*expected a list"):
219219
PresetManifest(manifest_path)
220220

221-
def test_empty_list_templates_still_reports_no_templates(
222-
self, temp_dir, valid_pack_data
223-
):
224-
"""An EMPTY LIST is a well-typed container with no templates, so it keeps
225-
the "must provide at least one template" message (regression guard for the
226-
type-before-emptiness ordering)."""
227-
valid_pack_data["provides"]["templates"] = []
228-
manifest_path = temp_dir / "preset.yml"
229-
manifest_path.write_text(yaml.dump(valid_pack_data), encoding="utf-8")
230-
with pytest.raises(PresetValidationError, match="at least one template"):
231-
PresetManifest(manifest_path)
221+
# NOTE: the empty-list case (a well-typed container with no templates, which
222+
# must keep the "must provide at least one template" message after the
223+
# type-before-emptiness reordering) is already covered by
224+
# test_no_templates_provided below.
232225

233226
@pytest.mark.parametrize("bad_entry", [None, 5, "oops", ["nested"]])
234227
def test_non_mapping_template_entry_raises_validation_error(

0 commit comments

Comments
 (0)