diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index 1e5a70f77c..41f5ebc356 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -682,6 +682,7 @@ class Drawing(bonsai.core.tool.Drawing): @classmethod def generate_sheet_identification(cls) -> str: number = len([d for d in tool.Ifc.get().by_type("IfcDocumentInformation") if d.Scope == "SHEET"]) + number += 1 return "A" + str(number).zfill(2) @classmethod diff --git a/src/bonsai/test/tool/test_drawing.py b/src/bonsai/test/tool/test_drawing.py index b5d7537b0f..c7baa6a391 100644 --- a/src/bonsai/test/tool/test_drawing.py +++ b/src/bonsai/test/tool/test_drawing.py @@ -478,9 +478,9 @@ class TestGenerateSheetIdentification(NewFile): def test_run(self): ifc = ifcopenshell.file() tool.Ifc.set(ifc) - subject.generate_sheet_identification() == "A01" + assert subject.generate_sheet_identification() == "A01" document = ifc.createIfcDocumentInformation() - subject.generate_sheet_identification() == "A02" + assert subject.generate_sheet_identification() == "A02" class TestGetTextLiteral(NewFile): diff --git a/src/bonsai/test/tool/test_system.py b/src/bonsai/test/tool/test_system.py index 40e54d67b7..5ed7eab16d 100644 --- a/src/bonsai/test/tool/test_system.py +++ b/src/bonsai/test/tool/test_system.py @@ -164,7 +164,7 @@ class TestGetPorts(NewFile): element = ifc.createIfcDuctSegment() port = ifc.createIfcDistributionPort() ifcopenshell.api.run("system.assign_port", ifc, element=element, port=port) - subject.get_ports(element) == [port] + assert subject.get_ports(element) == [port] class TestImportSystemAttributes(NewFile):