mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 19:07:57 +00:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user