Avoid producing test artifacts in src/bonsai

This commit is contained in:
Andrej730
2025-11-11 19:37:11 +05:00
parent 7f8cb80281
commit 25d3edc537
5 changed files with 25 additions and 5 deletions
+4 -1
View File
@@ -157,13 +157,16 @@ Scenario: Remove drawing
Scenario: Remove drawing - via object deletion
Given an empty IFC project
And I save IFC project
And I add a cube
And the object "Cube" is selected
And I look at the "Class" panel
And I set the "Products" property to "IfcElement"
And I set the "Class" property to "IfcWall"
And I click "Assign IFC Class"
And I press "bim.add_drawing"
And I look at the "Drawings" panel
And I click "IMPORT"
And I click "ADD"
And the variable "drawing" is "IfcStore.get_file().by_type('IfcAnnotation')[0].id()"
And the collection "IfcAnnotation/PLAN_VIEW" exists
And the object "IfcAnnotation/PLAN_VIEW" is selected
+3 -1
View File
@@ -815,8 +815,9 @@ class TestDrawingMaintainingSheetPosition(NewFile):
def test_run(self):
props = tool.Drawing.get_document_props()
bpy.ops.bim.create_project()
tool.Project.save_test_project()
ifc = tool.Ifc.get()
sheet_path = Path.cwd() / "layouts" / "A01 - UNTITLED.svg"
sheet_path = Path(tool.Ifc.get_path()).parent / "layouts" / "A01 - UNTITLED.svg"
bpy.ops.mesh.primitive_cube_add(size=10, location=(0, 0, 4))
obj = bpy.data.objects["Cube"]
@@ -870,6 +871,7 @@ class TestDrawingMaintainingSheetPosition(NewFile):
class TestDrawingStyles(NewFile):
def setup_project_with_drawing(self):
bpy.ops.bim.create_project()
tool.Project.save_test_project()
bpy.ops.bim.load_drawings()
bpy.ops.bim.add_drawing()
ifc = tool.Ifc.get()