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