diff --git a/src/Mod/Draft/drafttests/auxiliary.py b/src/Mod/Draft/drafttests/auxiliary.py index 5f6927f6a8d1..e0580078571a 100644 --- a/src/Mod/Draft/drafttests/auxiliary.py +++ b/src/Mod/Draft/drafttests/auxiliary.py @@ -21,13 +21,16 @@ # * USA * # * * # *************************************************************************** + """Auxiliary functions for the unit tests of the Draft Workbench.""" + ## @package auxiliary # \ingroup drafttests # \brief Auxiliary functions for the unit tests of the Draft Workbench. ## \addtogroup drafttests # @{ + import traceback from draftutils.messages import _msg diff --git a/src/Mod/Draft/drafttests/draft_test_objects.py b/src/Mod/Draft/drafttests/draft_test_objects.py index 1526ac9ac9aa..6f9d454cdd16 100644 --- a/src/Mod/Draft/drafttests/draft_test_objects.py +++ b/src/Mod/Draft/drafttests/draft_test_objects.py @@ -21,9 +21,10 @@ # * USA * # * * # *************************************************************************** + """Run this file to create a standard test document for Draft objects. -Use it as input to the program executable. +Use it as input for the program executable. :: @@ -34,20 +35,22 @@ >>> import drafttests.draft_test_objects as dt >>> dt.create_test_file() """ + ## @package draft_test_objects # \ingroup drafttests # \brief Run this file to create a standard test document for Draft objects. ## \addtogroup drafttests # @{ + import datetime import FreeCAD as App import Part import Draft - -from draftutils.messages import _msg, _wrn from FreeCAD import Vector +from draftutils.messages import _msg, _wrn + if App.GuiUp: import FreeCADGui as Gui diff --git a/src/Mod/Draft/drafttests/test_airfoildat.py b/src/Mod/Draft/drafttests/test_airfoildat.py index 7311a9175099..f336b177230f 100644 --- a/src/Mod/Draft/drafttests/test_airfoildat.py +++ b/src/Mod/Draft/drafttests/test_airfoildat.py @@ -22,21 +22,23 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, Airfoil DAT import and export tests.""" + ## @package test_airfoildat # \ingroup drafttests # \brief Unit tests for the Draft Workbench, Airfoil DAT tests. ## \addtogroup drafttests # @{ + import os import FreeCAD as App import Draft -import drafttests.auxiliary as aux - -from draftutils.messages import _msg +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftAirfoilDAT(test_base.DraftTestCaseDoc): @@ -48,7 +50,7 @@ def test_read_airfoildat(self): _msg(" Test '{}'".format(operation)) _msg(" This test requires a DAT file with airfoil data to read.") - file = 'Mod/Draft/drafttest/test.dat' + file = "Mod/Draft/drafttest/test.dat" in_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(in_file)) _msg(" exists={}".format(os.path.exists(in_file))) @@ -62,7 +64,7 @@ def test_export_airfoildat(self): operation = "importAirfoilDAT.export" _msg(" Test '{}'".format(operation)) - file = 'Mod/Draft/drafttest/out_test.dat' + file = "Mod/Draft/drafttest/out_test.dat" out_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(out_file)) _msg(" exists={}".format(os.path.exists(out_file))) diff --git a/src/Mod/Draft/drafttests/test_array.py b/src/Mod/Draft/drafttests/test_array.py index b0a4e7175257..1e49cb4d66e3 100644 --- a/src/Mod/Draft/drafttests/test_array.py +++ b/src/Mod/Draft/drafttests/test_array.py @@ -19,20 +19,18 @@ # * . * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, array tests.""" + ## @package test_array # \ingroup drafttests # \brief Unit tests for the Draft Workbench, array tests. ## \addtogroup drafttests # @{ -import math -import FreeCAD as App import Draft - from FreeCAD import Vector -from draftutils.messages import _msg from drafttests import test_base @@ -41,29 +39,29 @@ class DraftArray(test_base.DraftTestCaseDoc): def test_link_array(self): """Create a link array.""" - box = self.doc.addObject("Part::Box","Box") + box = self.doc.addObject("Part::Box", "Box") box.Label = "Box" self.doc.recompute() - array = Draft.make_ortho_array(box, v_x=App.Vector(100.0, 0.0, 0.0), - v_y=App.Vector(0.0, 100.0, 0.0), - v_z=App.Vector(0.0, 0.0, 100.0), + array = Draft.make_ortho_array(box, v_x=Vector(100.0, 0.0, 0.0), + v_y=Vector(0.0, 100.0, 0.0), + v_z=Vector(0.0, 0.0, 100.0), n_x=12, n_y=1, n_z=1, use_link=True) Draft.autogroup(array) array.ExpandArray = True array.Fuse = False - self.doc.recompute(None,True,True) + self.doc.recompute(None, True, True) array.NumberX = 6 - self.doc.recompute(None,True,True) + self.doc.recompute(None, True, True) self.assertEqual(array.Count, array.NumberX) array.NumberX = 24 - self.doc.recompute(None,True,True) + self.doc.recompute(None, True, True) self.assertEqual(array.Count, array.NumberX) - self.doc.recompute(None,True,True) + self.doc.recompute(None, True, True) self.assertEqual(array.Count, array.NumberX) ## @} diff --git a/src/Mod/Draft/drafttests/test_base.py b/src/Mod/Draft/drafttests/test_base.py index 9d07424d088f..df29f665394f 100644 --- a/src/Mod/Draft/drafttests/test_base.py +++ b/src/Mod/Draft/drafttests/test_base.py @@ -21,6 +21,8 @@ # * * # *************************************************************************** +"""Unit tests for the Draft Workbench, base classes.""" + import unittest import FreeCAD as App diff --git a/src/Mod/Draft/drafttests/test_creation.py b/src/Mod/Draft/drafttests/test_creation.py index 30a484c41027..0a224a8dd853 100644 --- a/src/Mod/Draft/drafttests/test_creation.py +++ b/src/Mod/Draft/drafttests/test_creation.py @@ -22,22 +22,23 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, object creation tests.""" + ## @package test_creation # \ingroup drafttests # \brief Unit tests for the Draft Workbench, object creation tests. ## \addtogroup drafttests # @{ + import math import FreeCAD as App import Draft -import drafttests.auxiliary as aux - from FreeCAD import Vector -from draftutils.messages import _msg from drafttests import test_base +from draftutils.messages import _msg class DraftCreation(test_base.DraftTestCaseDoc): diff --git a/src/Mod/Draft/drafttests/test_draftgeomutils.py b/src/Mod/Draft/drafttests/test_draftgeomutils.py index 12e671b1914e..3523ba086a26 100644 --- a/src/Mod/Draft/drafttests/test_draftgeomutils.py +++ b/src/Mod/Draft/drafttests/test_draftgeomutils.py @@ -21,14 +21,15 @@ # * USA * # * * # *************************************************************************** -"""Unit test for the DraftGeomUtils module.""" -import FreeCAD +"""Unit tests for the Draft Workbench, DraftGeomUtils module tests.""" + import Part import DraftGeomUtils -import drafttests.auxiliary as aux -from draftutils.messages import _msg +from FreeCAD import Vector from drafttests import test_base +from draftutils.messages import _msg + class TestDraftGeomUtils(test_base.DraftTestCaseNoDoc): """Testing the functions in the file DraftGeomUtils.py""" @@ -62,10 +63,10 @@ def test_get_extended_wire1(self): _msg(" Test '{}'".format(operation)) # Build wires made with straight edges and various combination of Orientation: the wires 1-4 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 2500.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 2500.0)] edges = [] for start, end in zip(points[:-1], points[1:]): @@ -80,10 +81,10 @@ def test_get_extended_wire2(self): _msg(" Test '{}'".format(operation)) # Build wires made with straight edges and various combination of Orientation: the wires 1-4 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 2500.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 2500.0)] edges = [] for start, end in zip(points[:-1], points[1:]): @@ -99,10 +100,10 @@ def test_get_extended_wire3(self): _msg(" Test '{}'".format(operation)) # Build wires made with straight edges and various combination of Orientation: the wires 1-4 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 2500.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 2500.0)] edges = [] for start, end in zip(points[:-1], points[1:]): @@ -119,10 +120,10 @@ def test_get_extended_wire4(self): _msg(" Test '{}'".format(operation)) # Build wires made with straight edges and various combination of Orientation: the wires 1-4 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 0.0), - FreeCAD.Vector(4500.0, 2000.0, 2500.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 0.0), + Vector(4500.0, 2000.0, 2500.0)] edges = [] for start, end in zip(points[:-1], points[1:]): @@ -138,11 +139,11 @@ def test_get_extended_wire5(self): _msg(" Test '{}'".format(operation)) # Build wires made with arcs and various combination of Orientation: the wires 5-8 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1000.0, 1000.0, 0.0), - FreeCAD.Vector(2000.0, 0.0, 0.0), - FreeCAD.Vector(3000.0, 0.0, 1000.0), - FreeCAD.Vector(4000.0, 0.0, 0.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1000.0, 1000.0, 0.0), + Vector(2000.0, 0.0, 0.0), + Vector(3000.0, 0.0, 1000.0), + Vector(4000.0, 0.0, 0.0)] edges = [] for start, mid, end in zip(points[:-2], points[1:-1], points[2:]): @@ -157,11 +158,11 @@ def test_get_extended_wire6(self): _msg(" Test '{}'".format(operation)) # Build wires made with arcs and various combination of Orientation: the wires 5-8 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1000.0, 1000.0, 0.0), - FreeCAD.Vector(2000.0, 0.0, 0.0), - FreeCAD.Vector(3000.0, 0.0, 1000.0), - FreeCAD.Vector(4000.0, 0.0, 0.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1000.0, 1000.0, 0.0), + Vector(2000.0, 0.0, 0.0), + Vector(3000.0, 0.0, 1000.0), + Vector(4000.0, 0.0, 0.0)] edges = [] for start, mid, end in zip(points[:-2], points[1:-1], points[2:]): @@ -177,11 +178,11 @@ def test_get_extended_wire7(self): _msg(" Test '{}'".format(operation)) # Build wires made with arcs and various combination of Orientation: the wires 5-8 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1000.0, 1000.0, 0.0), - FreeCAD.Vector(2000.0, 0.0, 0.0), - FreeCAD.Vector(3000.0, 0.0, 1000.0), - FreeCAD.Vector(4000.0, 0.0, 0.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1000.0, 1000.0, 0.0), + Vector(2000.0, 0.0, 0.0), + Vector(3000.0, 0.0, 1000.0), + Vector(4000.0, 0.0, 0.0)] edges = [] for start, mid, end in zip(points[:-2], points[1:-1], points[2:]): @@ -198,11 +199,11 @@ def test_get_extended_wire8(self): _msg(" Test '{}'".format(operation)) # Build wires made with arcs and various combination of Orientation: the wires 5-8 are all equivalent - points = [FreeCAD.Vector(0.0, 0.0, 0.0), - FreeCAD.Vector(1000.0, 1000.0, 0.0), - FreeCAD.Vector(2000.0, 0.0, 0.0), - FreeCAD.Vector(3000.0, 0.0, 1000.0), - FreeCAD.Vector(4000.0, 0.0, 0.0)] + points = [Vector(0.0, 0.0, 0.0), + Vector(1000.0, 1000.0, 0.0), + Vector(2000.0, 0.0, 0.0), + Vector(3000.0, 0.0, 1000.0), + Vector(4000.0, 0.0, 0.0)] edges = [] for start, mid, end in zip(points[:-2], points[1:-1], points[2:]): diff --git a/src/Mod/Draft/drafttests/test_dwg.py b/src/Mod/Draft/drafttests/test_dwg.py index 195d6f9135d7..5605aa919752 100644 --- a/src/Mod/Draft/drafttests/test_dwg.py +++ b/src/Mod/Draft/drafttests/test_dwg.py @@ -23,20 +23,21 @@ # * * # *************************************************************************** """Unit tests for the Draft Workbench, DWG import and export tests.""" + ## @package test_dwg # \ingroup drafttests # \brief Unit tests for the Draft Workbench, DWG import and export tests. ## \addtogroup drafttests # @{ + import os import FreeCAD as App import Draft -import drafttests.auxiliary as aux - -from draftutils.messages import _msg +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftDWG(test_base.DraftTestCaseDoc): @@ -48,7 +49,7 @@ def test_read_dwg(self): _msg(" Test '{}'".format(operation)) _msg(" This test requires a DWG file to read.") - file = 'Mod/Draft/drafttest/test.dwg' + file = "Mod/Draft/drafttest/test.dwg" in_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(in_file)) _msg(" exists={}".format(os.path.exists(in_file))) @@ -62,7 +63,7 @@ def test_export_dwg(self): operation = "importDWG.export" _msg(" Test '{}'".format(operation)) - file = 'Mod/Draft/drafttest/out_test.dwg' + file = "Mod/Draft/drafttest/out_test.dwg" out_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(out_file)) _msg(" exists={}".format(os.path.exists(out_file))) diff --git a/src/Mod/Draft/drafttests/test_dxf.py b/src/Mod/Draft/drafttests/test_dxf.py index ddb73c58b798..e64486a5303f 100644 --- a/src/Mod/Draft/drafttests/test_dxf.py +++ b/src/Mod/Draft/drafttests/test_dxf.py @@ -22,21 +22,23 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, DXF import and export tests.""" + ## @package test_dxf # \ingroup drafttests # \brief Unit tests for the Draft Workbench, DXF import and export tests. ## \addtogroup drafttests # @{ + import os import FreeCAD as App import Draft -import drafttests.auxiliary as aux - -from draftutils.messages import _msg +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftDXF(test_base.DraftTestCaseDoc): @@ -48,7 +50,7 @@ def test_read_dxf(self): _msg(" Test '{}'".format(operation)) _msg(" This test requires a DXF file to read.") - file = 'Mod/Draft/drafttest/test.dxf' + file = "Mod/Draft/drafttest/test.dxf" in_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(in_file)) _msg(" exists={}".format(os.path.exists(in_file))) @@ -62,7 +64,7 @@ def test_export_dxf(self): operation = "importDXF.export" _msg(" Test '{}'".format(operation)) - file = 'Mod/Draft/drafttest/out_test.dxf' + file = "Mod/Draft/drafttest/out_test.dxf" out_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(out_file)) _msg(" exists={}".format(os.path.exists(out_file))) diff --git a/src/Mod/Draft/drafttests/test_import.py b/src/Mod/Draft/drafttests/test_import.py index 08f69191d96f..9a5007295f9e 100644 --- a/src/Mod/Draft/drafttests/test_import.py +++ b/src/Mod/Draft/drafttests/test_import.py @@ -22,14 +22,17 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, import tests.""" + ## @package test_import # \ingroup drafttests # \brief Unit tests for the Draft Workbench, import tests. ## \addtogroup drafttests # @{ -import drafttests.auxiliary as aux + +from drafttests import auxiliary as aux from drafttests import test_base diff --git a/src/Mod/Draft/drafttests/test_import_gui.py b/src/Mod/Draft/drafttests/test_import_gui.py index b145029b03c6..eb686eb702ae 100644 --- a/src/Mod/Draft/drafttests/test_import_gui.py +++ b/src/Mod/Draft/drafttests/test_import_gui.py @@ -22,14 +22,17 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, GUI import tests.""" + ## @package test_import_gui # \ingroup drafttests # \brief Unit tests for the Draft Workbench, GUI import tests. ## \addtogroup drafttests # @{ -import drafttests.auxiliary as aux + +from drafttests import auxiliary as aux from drafttests import test_base diff --git a/src/Mod/Draft/drafttests/test_import_tools.py b/src/Mod/Draft/drafttests/test_import_tools.py index 2e0dfe9bd444..757bacc583cd 100644 --- a/src/Mod/Draft/drafttests/test_import_tools.py +++ b/src/Mod/Draft/drafttests/test_import_tools.py @@ -23,13 +23,15 @@ # * * # *************************************************************************** """Unit tests for the Draft Workbench, tools import tests.""" + ## @package test_import_tools # \ingroup drafttests # \brief Unit tests for the Draft Workbench, tools import tests. ## \addtogroup drafttests # @{ -import drafttests.auxiliary as aux + +from drafttests import auxiliary as aux from drafttests import test_base diff --git a/src/Mod/Draft/drafttests/test_modification.py b/src/Mod/Draft/drafttests/test_modification.py index 9bf41bdfe9d3..2fb0a57ba7f1 100644 --- a/src/Mod/Draft/drafttests/test_modification.py +++ b/src/Mod/Draft/drafttests/test_modification.py @@ -22,21 +22,23 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, object modification tests.""" + ## @package test_modification # \ingroup drafttests # \brief Unit tests for the Draft Workbench, object modification tests. ## \addtogroup drafttests # @{ + import FreeCAD as App -import Draft -import drafttests.auxiliary as aux import Part - +import Draft from FreeCAD import Vector -from draftutils.messages import _msg, _wrn +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftModification(test_base.DraftTestCaseDoc): diff --git a/src/Mod/Draft/drafttests/test_oca.py b/src/Mod/Draft/drafttests/test_oca.py index 695adb9ec135..1b2b7b90b898 100644 --- a/src/Mod/Draft/drafttests/test_oca.py +++ b/src/Mod/Draft/drafttests/test_oca.py @@ -22,21 +22,23 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, OCA import and export tests.""" + ## @package test_oca # \ingroup drafttests # \brief Unit tests for the Draft Workbench, OCA import and export tests. ## \addtogroup drafttests # @{ + import os import FreeCAD as App import Draft -import drafttests.auxiliary as aux - -from draftutils.messages import _msg +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftOCA(test_base.DraftTestCaseDoc): @@ -48,7 +50,7 @@ def test_read_oca(self): _msg(" Test '{}'".format(operation)) _msg(" This test requires an OCA file to read.") - file = 'Mod/Draft/drafttest/test.oca' + file = "Mod/Draft/drafttest/test.oca" in_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(in_file)) _msg(" exists={}".format(os.path.exists(in_file))) @@ -62,7 +64,7 @@ def test_export_oca(self): operation = "importOCA.export" _msg(" Test '{}'".format(operation)) - file = 'Mod/Draft/drafttest/out_test.oca' + file = "Mod/Draft/drafttest/out_test.oca" out_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(out_file)) _msg(" exists={}".format(os.path.exists(out_file))) diff --git a/src/Mod/Draft/drafttests/test_pivy.py b/src/Mod/Draft/drafttests/test_pivy.py index b2f10f0eca31..8adcf3bd1037 100644 --- a/src/Mod/Draft/drafttests/test_pivy.py +++ b/src/Mod/Draft/drafttests/test_pivy.py @@ -22,18 +22,20 @@ # * USA * # * * # *************************************************************************** + """Unit tests for the Draft Workbench, Coin (Pivy) tests.""" + ## @package test_pivy # \ingroup drafttests # \brief Unit tests for the Draft Workbench, Coin (Pivy) tests. ## \addtogroup drafttests # @{ -import FreeCADGui as Gui -import drafttests.auxiliary as aux -from draftutils.messages import _msg +import FreeCADGui as Gui +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg class DraftPivy(test_base.DraftTestCaseDoc): diff --git a/src/Mod/Draft/drafttests/test_svg.py b/src/Mod/Draft/drafttests/test_svg.py index 88e77e338852..9619b010253d 100644 --- a/src/Mod/Draft/drafttests/test_svg.py +++ b/src/Mod/Draft/drafttests/test_svg.py @@ -23,21 +23,22 @@ # * * # *************************************************************************** """Unit tests for the Draft Workbench, SVG import and export tests.""" + ## @package test_svg # \ingroup drafttests # \brief Unit tests for the Draft Workbench, SVG import and export tests. ## \addtogroup drafttests # @{ + import os import unittest import FreeCAD as App import Draft -import drafttests.auxiliary as aux - -from draftutils.messages import _msg +from drafttests import auxiliary as aux from drafttests import test_base +from draftutils.messages import _msg try: import Arch @@ -56,7 +57,7 @@ def test_read_svg(self): _msg(" Test '{}'".format(operation)) _msg(" This test requires an SVG file to read.") - file = 'Mod/Draft/drafttest/test.svg' + file = "Mod/Draft/drafttest/test.svg" in_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(in_file)) _msg(" exists={}".format(os.path.exists(in_file))) @@ -70,7 +71,7 @@ def test_export_svg(self): operation = "importSVG.export" _msg(" Test '{}'".format(operation)) - file = 'Mod/Draft/drafttest/out_test.svg' + file = "Mod/Draft/drafttest/out_test.svg" out_file = os.path.join(App.getResourceDir(), file) _msg(" file={}".format(out_file)) _msg(" exists={}".format(os.path.exists(out_file))) @@ -85,15 +86,15 @@ def test_get_svg_from_arch_space_with_zero_vector(self): import Part import Draft - sb = Part.makeBox(1,1,1) - b = self.doc.addObject('Part::Feature','Box') + sb = Part.makeBox(1, 1, 1) + b = self.doc.addObject("Part::Feature", "Box") b.Shape = sb s = Arch.makeSpace(b) self.doc.recompute() try: - Draft.get_svg(s, direction=App.Vector(0,0,0)) + Draft.get_svg(s, direction=App.Vector(0, 0, 0)) except AttributeError as err: self.fail("Cryptic exception thrown: {}".format(err)) except ValueError as err: