mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +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)
|
item1 = ifcopenshell.api.cost.add_cost_item(self.file, cost_schedule=schedule)
|
||||||
item2 = ifcopenshell.api.cost.add_cost_item(self.file, cost_item=item1)
|
item2 = ifcopenshell.api.cost.add_cost_item(self.file, cost_item=item1)
|
||||||
ifcopenshell.api.cost.remove_cost_item(self.file, cost_item=item2)
|
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 self.file.by_type("IfcRelAssignsToControl")
|
||||||
assert not self.file.by_type("IfcRelNests")
|
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)
|
item1 = ifcopenshell.api.cost.add_cost_item(self.file, cost_schedule=schedule)
|
||||||
item2 = 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)
|
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)
|
rel = next(iter(self.file.by_type("IfcRelAssignsToControl")), None)
|
||||||
assert rel
|
assert rel
|
||||||
assert rel.RelatedObjects == (item2,)
|
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)
|
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
|
assert new_style.Name == style_name
|
||||||
style_elements = new_style.Styles
|
style_elements = new_style.Styles
|
||||||
assert len(style_elements) == 1
|
assert len(style_elements) == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user