mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 17:58:20 +00:00
Data types
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user