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

Method test_run

src/bonsai/test/tool/test_drawing.py:77–91  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75
76class TestCreateSvgSheet(NewFile):
77 def test_run(self):
78 ifc = ifcopenshell.file()
79 ifcopenshell.api.root.create_entity(ifc, ifc_class="IfcProject")
80 tool.Ifc.set(ifc)
81 ifc_path = Path("test/files/temp/test.ifc").absolute()
82 bpy.ops.bim.save_project(filepath=str(ifc_path), should_save_as=True)
83 document = ifc.createIfcDocumentInformation(
84 Identification="X",
85 Name="FOOBAR",
86 Scope="SHEET",
87 Location=(ifc_path.parent / "layouts" / "X - FOOBAR.svg").as_posix(),
88 )
89 uri = subject.create_svg_sheet(document, "A1")
90 assert uri.endswith(".svg")
91 assert os.path.isfile(uri)
92
93
94class TestDeleteCollection(NewFile):

Callers

nothing calls this directly

Calls 5

fileMethod · 0.45
create_entityMethod · 0.45
setMethod · 0.45
save_projectMethod · 0.45
create_svg_sheetMethod · 0.45

Tested by

no test coverage detected