Package pysys :: Module constants
[hide private]
[frames] | no frames]

Module constants

source code

Defines global constants that are used throughout the PySys framework.

The standard convention is to import all contents of the module so that the constants can be referenced directly. The module also contains methods for locating and parsing the PySys project file (pysys.constants.loadproject), and the project class that provides an abstraction over the contents of the file (pysys.constants.Project). For more information about the structure and contents of the project file, see the PySys examples distribution.

Classes [hide private]
  Project
Class detailing project specific information for a set of PySys tests.
Functions [hide private]
 
loadproject(start)
Load the PySys project file.
source code
Variables [hide private]
  HOSTNAME = 'acv-win2012.eur.ad.sag'
  WINDIR = 'C:\\Windows'
  PLATFORM = 'win32'
  OSFAMILY = 'windows'
  DEVNULL = 'nul'
  ENVSEPERATOR = ';'
  PATH = 'C:\\Windows;C:\\Windows\\system32;C:\\Windows\\System3...
  LD_LIBRARY_PATH = ''
  DYLD_LIBRARY_PATH = ''
  SITE_PACKAGES_DIR = 'c:\\apama_build\\apama-lib3\\win\\amd64\\...
  TRUE = True
  FALSE = False
  BACKGROUND = 10
  FOREGROUND = 11
  PASSED = 20
  INSPECT = 21
  NOTVERIFIED = 22
  FAILED = 23
  TIMEDOUT = 24
  DUMPEDCORE = 25
  BLOCKED = 26
  SKIPPED = 27
  LOOKUP = {False: 'FALSE', True: 'TRUE', 20: 'PASSED', 21: 'REQ...
  PRECEDENT = [27, 26, 25, 24, 23, 22, 21, 20]
  FAILS = [26, 25, 24, 23]
  DEFAULT_PROJECTFILE = ['pysysproject.xml', '.pysysproject']
  DEFAULT_DESCRIPTOR = ['pysystest.xml', '.pysystest', 'descript...
  DEFAULT_MODULE = 'run'
  DEFAULT_GROUP = ''
  DEFAULT_TESTCLASS = 'PySysTest'
  DEFAULT_INPUT = 'Input'
  DEFAULT_OUTPUT = 'Output'
  DEFAULT_REFERENCE = 'Reference'
  DEFAULT_RUNNER = ['BaseRunner', 'pysys.baserunner']
  DEFAULT_MAKER = ['ConsoleMakeTestHelper', 'pysys.launcher.cons...
  DEFAULT_WRITER = ['XMLResultsWriter', 'pysys.writer', 'testsum...
  DEFAULT_STYLESHEET = 'c:\\apama_build\\apama-lib3\\win\\amd64\...
  DEFAULT_FORMAT_STDOUT = '%(asctime)s %(levelname)-5s %(message)s'
  DEFAULT_FORMAT_RUNLOG = '%(asctime)s %(levelname)-5s %(message)s'
  DEFAULT_ABORT_ON_ERROR = False
  OSWALK_IGNORES = ['Input', 'Output', 'Reference', 'CVS', '.svn']
  DEFAULT_TIMEOUT = 600
  TIMEOUTS = {'ManualTester': 1800, 'WaitForFile': 30, 'WaitForP...
  PROJECT = None
  __package__ = 'pysys'
Function Details [hide private]

loadproject(start)

source code 

Load the PySys project file.

The method walks up the directory tree from the supplied path until the PySys project file is found. The location of the project file defines the project root location. The contents of the project file determine project specific constants as specified by property elements in the xml project file.

To ensure that all loaded modules have a pre-initialised projects instance, any launching application should first import the loadproject file, and then make a call to it prior to importing all names within the constants module.

Parameters:
  • start - The initial path to start from when trying to locate the project file

Variables Details [hide private]

PATH

Value:
'C:\\Windows;C:\\Windows\\system32;C:\\Windows\\System32\\Wbem'

SITE_PACKAGES_DIR

Value:
'c:\\apama_build\\apama-lib3\\win\\amd64\\all\\python\\2.7.13\\Lib\\si\
te-packages'

LOOKUP

Value:
{False: 'FALSE',
 True: 'TRUE',
 20: 'PASSED',
 21: 'REQUIRES INSPECTION',
 22: 'NOT VERIFIED',
 23: 'FAILED',
 24: 'TIMED OUT',
 25: 'DUMPED CORE',
...

DEFAULT_DESCRIPTOR

Value:
['pysystest.xml', '.pysystest', 'descriptor.xml']

DEFAULT_MAKER

Value:
['ConsoleMakeTestHelper', 'pysys.launcher.console']

DEFAULT_WRITER

Value:
['XMLResultsWriter',
 'pysys.writer',
 'testsummary_%Y%m%d%H%M%S.xml',
 {}]

DEFAULT_STYLESHEET

Value:
'c:\\apama_build\\apama-lib3\\win\\amd64\\all\\python\\2.7.13\\Lib\\si\
te-packages\\pysys-log.xsl'

TIMEOUTS

Value:
{'ManualTester': 1800,
 'WaitForFile': 30,
 'WaitForProcess': 600,
 'WaitForProcessStop': 30,
 'WaitForSignal': 60,
 'WaitForSocket': 60}