[TechDraw] Fix making template bug for tests
This commit is contained in:
committed by
WandererFan
parent
6893938f2a
commit
48661cd3c7
@@ -12,7 +12,7 @@ class DrawViewSymbolTest(unittest.TestCase):
|
||||
FreeCAD.newDocument("TDAnno")
|
||||
FreeCAD.setActiveDocument("TDAnno")
|
||||
FreeCAD.ActiveDocument = FreeCAD.getDocument("TDAnno")
|
||||
self.page = createPageWithSVGTemplate("TDAnno")
|
||||
self.page = createPageWithSVGTemplate()
|
||||
|
||||
def tearDown(self):
|
||||
FreeCAD.closeDocument("TDAnno")
|
||||
|
||||
@@ -3,14 +3,10 @@ import FreeCAD
|
||||
import os
|
||||
|
||||
|
||||
def createPageWithSVGTemplate(
|
||||
templateName: str = "TestTemplate.svg",
|
||||
):
|
||||
def createPageWithSVGTemplate():
|
||||
"""Returns a page with an SVGTemplate added on the ActiveDocument"""
|
||||
print("2")
|
||||
path = os.path.dirname(os.path.abspath(__file__))
|
||||
print("TDTestAnno path: " + path)
|
||||
templateFileSpec = path + templateName
|
||||
templateFileSpec = path + "/TestTemplate.svg"
|
||||
|
||||
page = FreeCAD.ActiveDocument.addObject("TechDraw::DrawPage", "Page")
|
||||
FreeCAD.ActiveDocument.addObject("TechDraw::DrawSVGTemplate", "Template")
|
||||
|
||||
Reference in New Issue
Block a user