mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 14:07:43 +00:00
ifcopenshell.util.element.get_nest test
This commit is contained in:
@@ -760,6 +760,14 @@ class TestGetAggregateIFC4(test.bootstrap.IFC4):
|
|||||||
assert subject.get_aggregate(subelement) == element
|
assert subject.get_aggregate(subelement) == element
|
||||||
|
|
||||||
|
|
||||||
|
class TestGetNestIFC4(test.bootstrap.IFC4):
|
||||||
|
def test_getting_the_nest_parent_of_an_element(self):
|
||||||
|
element = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcTask")
|
||||||
|
subelement = ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcTask")
|
||||||
|
ifcopenshell.api.run("nest.assign_object", self.file, related_objects=[subelement], relating_object=element)
|
||||||
|
assert subject.get_nest(subelement) == element
|
||||||
|
|
||||||
|
|
||||||
class TestReplaceAttributeIFC4(test.bootstrap.IFC4):
|
class TestReplaceAttributeIFC4(test.bootstrap.IFC4):
|
||||||
def test_replacing_an_elements_attribute(self):
|
def test_replacing_an_elements_attribute(self):
|
||||||
element = self.file.createIfcWall("foo")
|
element = self.file.createIfcWall("foo")
|
||||||
|
|||||||
Reference in New Issue
Block a user