Skip to content

Commit ef1f990

Browse files
committed
Handle parentless rule bindings
Port the parent-default safeguard through the refactored immutable rule traversal. Generated with the assistance of an AI coding tool.
1 parent 6ef4c6f commit ef1f990

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/test_mvd.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,3 +142,10 @@ class entity_instance:
142142
)
143143
== "reference-guid"
144144
)
145+
146+
147+
def test_top_level_unbound_rule_has_no_parent_binding() -> None:
148+
top_level = rule("AttributeRule", "Status")
149+
parsed_template = template("IfcWall", "Status", (top_level,))
150+
151+
assert parsed_template.binding_for(top_level) is None

0 commit comments

Comments
 (0)