Modules that define classes used for unit testing the workbench. More...

Classes

class  drafttests.test_airfoildat.DraftAirfoilDAT
 
class  drafttests.test_creation.DraftCreation
 
class  drafttests.test_dwg.DraftDWG
 
class  drafttests.test_dxf.DraftDXF
 
class  drafttests.test_import.DraftImport
 
class  drafttests.test_import_gui.DraftGuiImport
 
class  drafttests.test_import_tools.DraftImportTools
 
class  drafttests.test_modification.DraftModification
 
class  drafttests.test_oca.DraftOCA
 
class  drafttests.test_pivy.DraftPivy
 
class  drafttests.test_svg.DraftSVG
 

Namespaces

namespace  auxiliary
 Auxiliary functions for the unit tests of the Draft Workbench.
 
namespace  draft_test_objects
 Run this file to create a standard test document for Draft objects.
 
namespace  test_airfoildat
 Unit tests for the Draft Workbench, Airfoil DAT tests.
 
namespace  test_creation
 Unit tests for the Draft Workbench, object creation tests.
 
namespace  test_dwg
 Unit tests for the Draft Workbench, DWG import and export tests.
 
namespace  test_dxf
 Unit tests for the Draft Workbench, DXF import and export tests.
 
namespace  test_import
 Unit tests for the Draft Workbench, import tests.
 
namespace  test_import_gui
 Unit tests for the Draft Workbench, GUI import tests.
 
namespace  test_import_tools
 Unit tests for the Draft Workbench, tools import tests.
 
namespace  test_modification
 Unit tests for the Draft Workbench, object modification tests.
 
namespace  test_oca
 Unit tests for the Draft Workbench, OCA import and export tests.
 
namespace  test_pivy
 Unit tests for the Draft Workbench, Coin (Pivy) tests.
 
namespace  test_svg
 Unit tests for the Draft Workbench, SVG import and export tests.
 

Functions

def drafttests.draft_test_objects.create_test_file (font_file=App.getHomePath()+"data/Mod/TechDraw/Resources/fonts/osifont-lgpl3fe.ttf", hatch_file=App.getHomePath()+"data/Mod/TechDraw/PAT/FCPAT.pat", hatch_name="Horizontal5")
 
def drafttests.auxiliary.draw_header ()
 
def drafttests.auxiliary.fake_function (p1=None, p2=None, p3=None, p4=None, p5=None)
 
def drafttests.auxiliary.import_test (module)
 
def drafttests.auxiliary.no_gui (module)
 
def drafttests.auxiliary.no_test ()
 

Detailed Description

Modules that define classes used for unit testing the workbench.

Function Documentation

◆ create_test_file()

def drafttests.draft_test_objects.create_test_file (   font_file = App.getHomePath()+"data/Mod/TechDraw/Resources/fonts/osifont-lgpl3fe.ttf",
  hatch_file = App.getHomePath()+"data/Mod/TechDraw/PAT/FCPAT.pat",
  hatch_name = "Horizontal5" 
)
Create a complete test file of Draft objects.

It draws a frame with information on the software used to create
the test document, and fills it with every object that can be created.

Parameters
----------
font_file: str, optional
    It defaults to `App.getHomePath()+"data/Mod/TechDraw/Resources/fonts/osifont-lgpl3fe.ttf"`
    It is the full path of a font file to be used to create a `Draft ShapeString`.
    If the file is not found, this object is not created.

hatch_file: str, optional
    It defaults to `App.getHomePath()+"data/Mod/TechDraw/PAT/FCPAT.pat"`
    It is the full path of a PAT file to be used to create a `Draft Hatch`.
    If the file is not found, this object is not created.

hatch_name: str, optional
    It defaults to `"Horizontal5"`
    It is the name of a hatch pattern in the hatch_file.

Returns
-------
App::Document
    A reference to the test document that was created.

References drafttests.draft_test_objects.create_test_file().

Referenced by drafttests.draft_test_objects.create_test_file().

◆ draw_header()

def drafttests.auxiliary.draw_header ( )
Draw a header for the tests.

◆ fake_function()

def drafttests.auxiliary.fake_function (   p1 = None,
  p2 = None,
  p3 = None,
  p4 = None,
  p5 = None 
)
Print a message for a test that doesn't actually exist.

References drafttests.auxiliary.no_test().

◆ import_test()

def drafttests.auxiliary.import_test (   module)
Try importing a module.

◆ no_gui()

def drafttests.auxiliary.no_gui (   module)
Print a message that there is no user interface.

◆ no_test()

def drafttests.auxiliary.no_test ( )
Print a message that the test is not currently implemented.

Referenced by drafttests.auxiliary.fake_function().