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

Method test_remove_element

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

Source from the content-addressed store, hash-verified

50 assert ifc_diff.change_register == {}
51
52 def test_remove_element(self):
53 ifc_file = setup_project()
54 wall = ifcopenshell.api.root.create_entity(ifc_file, ifc_class="IfcWall")
55
56 new_file = ifc_file.from_string(ifc_file.to_string())
57 wall_new = new_file.by_id(wall.id())
58 ifcopenshell.api.root.remove_product(new_file, wall_new)
59
60 ifc_diff = ifcdiff.IfcDiff(ifc_file, new_file)
61 ifc_diff.diff()
62 assert ifc_diff.added_elements == set()
63 assert ifc_diff.deleted_elements == {wall.GlobalId}
64 assert ifc_diff.change_register == {}
65
66 def test_changed_attribute(self):
67 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