mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
Update tests
This commit is contained in:
@@ -46,6 +46,19 @@ assert f[16].UnitComponent is None
|
|||||||
prop = f.by_type("IfcPropertySingleValue")[0]
|
prop = f.by_type("IfcPropertySingleValue")[0]
|
||||||
assert prop.NominalValue.wrappedValue in str(prop)
|
assert prop.NominalValue.wrappedValue in str(prop)
|
||||||
|
|
||||||
|
# An instance added to a new file yields the same string
|
||||||
|
# representation, except for any instance name identifiers.
|
||||||
|
f2 = ifcopenshell.open()
|
||||||
|
prop2 = f2.add(prop)
|
||||||
|
assert str(prop) == str(prop2).replace(str(prop2.id()), str(prop.id()))
|
||||||
|
assert prop2.id() == 1
|
||||||
|
|
||||||
|
# A recursively obtained python dictionary representation
|
||||||
|
# matches for copied instances as well
|
||||||
|
app = f.by_type("IfcApplication")[0]
|
||||||
|
assert f2.add(app).get_info(False, True) == app.get_info(False, True)
|
||||||
|
assert "Version" in dir(app)
|
||||||
|
|
||||||
# Some operations on ifcopenshell.entity_instance
|
# Some operations on ifcopenshell.entity_instance
|
||||||
assert f[22].Id == ''
|
assert f[22].Id == ''
|
||||||
assert f[22].Addresses is None
|
assert f[22].Addresses is None
|
||||||
|
|||||||
Reference in New Issue
Block a user