more tests for ifc2x3

This commit is contained in:
Andrej730
2024-05-09 14:59:23 +05:00
parent 2d35869c41
commit 8ffb77551f
35 changed files with 181 additions and 31 deletions
@@ -18,6 +18,7 @@
import test.bootstrap
import ifcopenshell.api
import ifcopenshell.util.element
class TestAddCostItem(test.bootstrap.IFC4):
@@ -33,4 +34,8 @@ class TestAddCostItem(test.bootstrap.IFC4):
item1 = ifcopenshell.api.run("cost.add_cost_item", self.file, cost_schedule=schedule)
item2 = ifcopenshell.api.run("cost.add_cost_item", self.file, cost_item=item1)
assert item2.is_a("IfcCostItem")
assert item2.Nests[0].RelatingObject == item1
assert ifcopenshell.util.element.get_nest(item2) == item1
class TestAddCostItemIFC2X3(test.bootstrap.IFC2X3, TestAddCostItem):
pass
@@ -33,3 +33,7 @@ class TestAddCostSchedule(test.bootstrap.IFC4):
assert schedule.Name == "Foo"
assert schedule.PredefinedType == "USERDEFINED"
assert schedule.ObjectType == "FOO"
class TestAddCostScheduleIFC2X3(test.bootstrap.IFC2X3, TestAddCostSchedule):
pass
@@ -45,3 +45,7 @@ class TestRemoveCostItem(test.bootstrap.IFC4):
assert not self.file.by_type("IfcCostItem")
assert not self.file.by_type("IfcRelAssignsToControl")
assert not self.file.by_type("IfcRelNests")
class TestRemoveCostItemIFC2X3(test.bootstrap.IFC2X3, TestRemoveCostItem):
pass
@@ -35,3 +35,7 @@ class TestRemoveCostSchedule(test.bootstrap.IFC4):
assert not self.file.by_type("IfcCostItem")
assert not self.file.by_type("IfcRelNests")
assert not self.file.by_type("IfcRelAssignsToControl")
class TestRemoveCostSchedule(test.bootstrap.IFC2X3, TestRemoveCostSchedule):
pass