mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 01:41:57 +00:00
temporary support for deprecated api arguments #4531
This commit is contained in:
@@ -29,7 +29,9 @@ class TestAssignContainer(test.bootstrap.IFC4):
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBuilding")
|
||||
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
subelement2 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
ifcopenshell.api.run("spatial.assign_container", self.file, products=[subelement, subelement2], relating_structure=element)
|
||||
ifcopenshell.api.run(
|
||||
"spatial.assign_container", self.file, products=[subelement, subelement2], relating_structure=element
|
||||
)
|
||||
ifcopenshell.api.run("spatial.unassign_container", self.file, products=[subelement, subelement2])
|
||||
assert not self.file.by_type("IfcRelContainedInSpatialStructure")
|
||||
|
||||
@@ -37,8 +39,9 @@ class TestAssignContainer(test.bootstrap.IFC4):
|
||||
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcBuilding")
|
||||
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
subelement2 = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcWall")
|
||||
ifcopenshell.api.run("spatial.assign_container", self.file, products=[subelement], relating_structure=element)
|
||||
ifcopenshell.api.run("spatial.assign_container", self.file, products=[subelement2], relating_structure=element)
|
||||
ifcopenshell.api.run(
|
||||
"spatial.assign_container", self.file, products=[subelement, subelement2], relating_structure=element
|
||||
)
|
||||
ifcopenshell.api.run("spatial.unassign_container", self.file, products=[subelement])
|
||||
rel = self.file.by_type("IfcRelContainedInSpatialStructure")[0]
|
||||
assert list(rel.RelatedElements) == [subelement2]
|
||||
|
||||
Reference in New Issue
Block a user