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

Function test_massive_bcf

src/bcf/tests/v2/test_bcf_xml.py:98–112  ·  view source on GitHub ↗
(xml_handler)

Source from the content-addressed store, hash-verified

96
97
98def test_massive_bcf(xml_handler) -> None:
99 bcf = BcfXml.create_new("Test project", xml_handler=xml_handler)
100 for i in range(100):
101 th = bcf.add_topic(f"Topic {i:04}", f"Message {i:04}", "Test author", "Test type")
102 vi = mdl.VisualizationInfo(
103 guid=str(uuid.uuid4()),
104 components=build_components(str(uuid.uuid4())),
105 perspective_camera=build_camera_from_vectors([i, 0, 0], [0, 1, 0], [0, 0, 1]),
106 )
107 vh = VisualizationInfoHandler(visualization_info=vi, xml_handler=xml_handler)
108 th.add_visinfo_handler(vh)
109 assert len(bcf.topics) == 100
110 with TemporaryDirectory() as tmp_dir:
111 file_path = Path(tmp_dir) / "test.bcf"
112 bcf.save(file_path)
113
114
115def test_equality_with_wrong_object(build_sample) -> None:

Callers

nothing calls this directly

Calls 8

build_componentsFunction · 0.90
rangeFunction · 0.50
create_newMethod · 0.45
add_topicMethod · 0.45
add_visinfo_handlerMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected