Data types

This commit is contained in:
Thomas Krijnen
2026-01-14 14:03:03 +01:00
parent 9e165319e6
commit 18c9140700
2 changed files with 3 additions and 3 deletions
@@ -33,7 +33,7 @@ class TestRemoveCostItem(test.bootstrap.IFC4):
item1 = ifcopenshell.api.cost.add_cost_item(self.file, cost_schedule=schedule)
item2 = ifcopenshell.api.cost.add_cost_item(self.file, cost_item=item1)
ifcopenshell.api.cost.remove_cost_item(self.file, cost_item=item2)
assert self.file.by_type("IfcCostItem") == [item1]
assert self.file.by_type("IfcCostItem") == (item1,)
assert self.file.by_type("IfcRelAssignsToControl")
assert not self.file.by_type("IfcRelNests")
@@ -51,7 +51,7 @@ class TestRemoveCostItem(test.bootstrap.IFC4):
item1 = ifcopenshell.api.cost.add_cost_item(self.file, cost_schedule=schedule)
item2 = ifcopenshell.api.cost.add_cost_item(self.file, cost_schedule=schedule)
ifcopenshell.api.cost.remove_cost_item(self.file, cost_item=item1)
assert self.file.by_type("IfcCostItem") == [item2]
assert self.file.by_type("IfcCostItem") == (item2,)
rel = next(iter(self.file.by_type("IfcRelAssignsToControl")), None)
assert rel
assert rel.RelatedObjects == (item2,)
@@ -479,7 +479,7 @@ class TestAppendAssetIFC2X3(test.bootstrap.IFC2X3):
)
new_style = ifcopenshell.api.project.append_asset(self.file, library=library, element=style)
assert self.file.by_type("IfcSurfaceStyle") == [new_style]
assert self.file.by_type("IfcSurfaceStyle") == (new_style,)
assert new_style.Name == style_name
style_elements = new_style.Styles
assert len(style_elements) == 1