aggregate.assign_object - support batching #4474

This commit is contained in:
Andrej730
2024-04-08 16:23:48 +05:00
parent b106d6a4d1
commit 833f67cf45
34 changed files with 187 additions and 143 deletions
+2 -2
View File
@@ -320,8 +320,8 @@ class TestGetParentSpace(NewFile):
element = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcBuildingStorey")
subelement = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcSpace")
project = ifcopenshell.api.run("root.create_entity", ifc, ifc_class="IfcProject")
ifcopenshell.api.run("aggregate.assign_object", ifc, product=subelement, relating_object=element)
ifcopenshell.api.run("aggregate.assign_object", ifc, product=element, relating_object=project)
ifcopenshell.api.run("aggregate.assign_object", ifc, products=[subelement], relating_object=element)
ifcopenshell.api.run("aggregate.assign_object", ifc, products=[element], relating_object=project)
assert subject.get_parent_space(subelement) == element
assert subject.get_parent_space(element) is None