MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / test_changed_attribute

Method test_changed_attribute

src/ifcdiff/test.py:66–78  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 assert ifc_diff.change_register == {}
65
66 def test_changed_attribute(self):
67 ifc_file = setup_project()
68 wall = ifcopenshell.api.root.create_entity(ifc_file, ifc_class="IfcWall", name="Foo")
69
70 new_file = ifc_file.from_string(ifc_file.to_string())
71 wall_new = new_file.by_id(wall.id())
72 wall_new.Name = "Bar"
73
74 ifc_diff = ifcdiff.IfcDiff(ifc_file, new_file, relationships=["attributes"])
75 ifc_diff.diff()
76 assert ifc_diff.added_elements == set()
77 assert ifc_diff.deleted_elements == set()
78 assert ifc_diff.change_register == {wall.GlobalId: {"attributes_changed": True}}
79
80 def test_changed_geometry(self):
81 ifc_file = setup_project()

Callers

nothing calls this directly

Calls 8

diffMethod · 0.95
from_stringMethod · 0.80
setup_projectFunction · 0.70
setFunction · 0.50
create_entityMethod · 0.45
to_stringMethod · 0.45
by_idMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected