Skip to content

Commit 948c4c0

Browse files
committed
test(bundler): correct absent-optional-mapping regression assertion
1 parent ca26d4a commit 948c4c0

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

tests/contract/test_manifest_schema.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,12 @@ def test_non_mapping_requires_rejected_including_falsy(bad):
156156
BundleManifest.from_dict(data)
157157

158158

159-
def test_absent_provides_and_requires_still_parse():
160-
# Absent optional fields remain valid: provides defaults to empty, requires
161-
# to an empty Requires — no regression from the None handling.
159+
def test_absent_provides_and_requires_do_not_raise_mapping_error():
160+
# Absent (None) optional mappings default to empty and must NOT trigger the
161+
# "must be a mapping when present" guard — that is reserved for present
162+
# non-mappings. (Structural completeness, e.g. requires.speckit_version, is
163+
# a separate concern checked by structural_errors().)
162164
data = valid_manifest_dict()
163165
data.pop("provides", None)
164166
data.pop("requires", None)
165-
manifest = BundleManifest.from_dict(data)
166-
assert manifest.structural_errors() == []
167+
BundleManifest.from_dict(data) # does not raise BundlerError

0 commit comments

Comments
 (0)