ifc2x3 tests

This commit is contained in:
Andrej730
2024-05-10 11:33:33 +05:00
parent c50d1ea2fe
commit 1e630ede08
41 changed files with 315 additions and 94 deletions
@@ -23,7 +23,7 @@ import ifcopenshell.api
class TestAssignFlowControl(test.bootstrap.IFC4):
def test_run(self):
flow_element = self.file.createIfcFlowSegment()
flow_control = self.file.createIfcController()
flow_control = self.file.create_entity("IfcDistributionControlElement")
# simple assignment
relation = ifcopenshell.api.run(
@@ -56,7 +56,7 @@ class TestAssignFlowControl(test.bootstrap.IFC4):
assert relation is None
# assigning another control to the same object
flow_control1 = self.file.createIfcController()
flow_control1 = self.file.create_entity("IfcDistributionControlElement")
relation = ifcopenshell.api.run(
"system.assign_flow_control",
self.file,
@@ -66,3 +66,7 @@ class TestAssignFlowControl(test.bootstrap.IFC4):
assert len(self.file.by_type("IfcRelFlowControlElements")) == 1
assert relation.RelatingFlowElement == flow_element
assert set(relation.RelatedControlElements) == set((flow_control, flow_control1))
class TestAssignFlowControlIFC2X3(test.bootstrap.IFC2X3, TestAssignFlowControl):
pass