ifc2x3 tests

removed part of test_append_two_type_products_sharing_the_same_material_indirectly_via_a_material_set for ifc2x3 compatibility and removed part is already tested in test_append_two_type_products_sharing_the_same_material_with_properties
This commit is contained in:
Andrej730
2024-05-13 12:32:58 +05:00
parent 3665dda87c
commit a9cba30da6
35 changed files with 395 additions and 262 deletions
@@ -23,20 +23,28 @@ import ifcopenshell.api
class TestEditReference(test.bootstrap.IFC4):
def test_editing_a_reference(self):
reference = self.file.createIfcLibraryReference()
attributes = {
"Location": "Location",
"Identification" if self.file.schema != "IFC2X3" else "ItemReference": "Identification",
"Name": "Name",
}
if self.file.schema != "IFC2X3":
attributes["Description"] = "Description"
attributes["Language"] = "Language"
ifcopenshell.api.run(
"library.edit_reference",
self.file,
reference=reference,
attributes={
"Location": "Location",
"Identification": "Identification",
"Name": "Name",
"Description": "Description",
"Language": "Language",
},
attributes=attributes,
)
assert reference.Location == "Location"
assert reference.Identification == "Identification"
# 1 IfcExternalReference Identification(>IFC2X3) / ItemReference (IFC2X3)
assert reference[1] == "Identification"
assert reference.Name == "Name"
assert reference.Description == "Description"
assert reference.Language == "Language"
if self.file.schema != "IFC2X3":
assert reference.Description == "Description"
assert reference.Language == "Language"
class TestEditReferenceIFC2X3(test.bootstrap.IFC2X3, TestEditReference):
pass