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

Method test_add_element

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

Source from the content-addressed store, hash-verified

38
39class TestIfcDiff:
40 def test_add_element(self):
41 ifc_file = setup_project()
42
43 new_file = ifc_file.from_string(ifc_file.to_string())
44 wall = ifcopenshell.api.root.create_entity(new_file, ifc_class="IfcWall")
45
46 ifc_diff = ifcdiff.IfcDiff(ifc_file, new_file)
47 ifc_diff.diff()
48 assert ifc_diff.added_elements == {wall.GlobalId}
49 assert ifc_diff.deleted_elements == set()
50 assert ifc_diff.change_register == {}
51
52 def test_remove_element(self):
53 ifc_file = setup_project()

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected