mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 02:23:34 +00:00
more tests for ifc2x3
This commit is contained in:
@@ -32,3 +32,7 @@ class TestAddClassification(test.bootstrap.IFC4):
|
||||
ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
|
||||
ifcopenshell.api.run("classification.add_classification", self.file, classification=classification)
|
||||
assert self.file.by_type("IfcClassification")[0].Name == "Name"
|
||||
|
||||
|
||||
class TestAddClassificationIFC2X3(test.bootstrap.IFC2X3, TestAddClassification):
|
||||
pass
|
||||
|
||||
@@ -47,7 +47,7 @@ class TestRemoveClassification(test.bootstrap.IFC4):
|
||||
def test_removing_a_classification_and_all_of_its_references_when_associated_with_a_resource(self):
|
||||
ifcopenshell.api.run("root.create_entity", self.file, ifc_class="IfcProject")
|
||||
result = ifcopenshell.api.run("classification.add_classification", self.file, classification="Name")
|
||||
element = self.file.createIfcMaterial(Name="Material")
|
||||
element = self.file.create_entity("IfcWall", Name="Wall")
|
||||
ifcopenshell.api.run(
|
||||
"classification.add_reference",
|
||||
self.file,
|
||||
@@ -59,4 +59,9 @@ class TestRemoveClassification(test.bootstrap.IFC4):
|
||||
ifcopenshell.api.run("classification.remove_classification", self.file, classification=result)
|
||||
assert not self.file.by_type("IfcClassification")
|
||||
assert not self.file.by_type("IfcClassificationReference")
|
||||
assert not self.file.by_type("IfcExternalReferenceRelationship")
|
||||
if self.file.schema != "IFC2X3":
|
||||
assert not self.file.by_type("IfcExternalReferenceRelationship")
|
||||
|
||||
|
||||
class TestRemoveClassificationIFC2X3(test.bootstrap.IFC2X3, TestRemoveClassification):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user