pysys.constants module

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.

pysys.constants.BACKGROUND = 10

Constant indicating a process is to be started asynchronously in the background.

pysys.constants.BLOCKED = 26

Failure test outcome indicating that something went wrong, for example an exception was raised by the testcase or a required file could not be found.

pysys.constants.DEFAULT_TIMEOUT = 600

Deprecated.

Deprecated:Use a specific member of TIMEOUTS instead.
pysys.constants.DUMPEDCORE = 25

Failure test outcome indicating that a crash occurred, and a core file was generated (UNIX only).

pysys.constants.FAILED = 23

Failure test outcome indicating validation steps with a negative outcome.

pysys.constants.FAILS = [26, 25, 24, 23]

Lists the test outcomes treated as failure. Outcomes such as NOTVERIFIED and SKIPPED are not considered failures.

pysys.constants.FOREGROUND = 11

Constant indicating a process is to be run synchronously in the foreground.

pysys.constants.HOSTNAME = 'aev-win2012.eur.ad.sag'

The fully qualified name of this host.

pysys.constants.INSPECT = 21

Non-failure test outcome indicating that manual inspection of the test output is required (in addition to any automated checks).

pysys.constants.IS_WINDOWS = True

True if this is Windows, False for other operating systems such as Unix.

pysys.constants.LOOKUP = {False: 'FALSE', True: 'TRUE', 20: 'PASSED', 21: 'REQUIRES INSPECTION', 22: 'NOT VERIFIED', 23: 'FAILED', 24: 'TIMED OUT', 25: 'DUMPED CORE', 26: 'BLOCKED', 27: 'SKIPPED'}

Lookup dictionary providing the string representation of test outcomes.

pysys.constants.NOTVERIFIED = 22

Non-failure test outcome indicating that it was not possible to positively validate correct operation. This is not treated as a failure outcome.

pysys.constants.OSWALK_IGNORES = ['Input', 'Output', 'Reference', 'CVS', '.svn', '__pycache__', '.git']

A list of directory names to exclude when recursively walking a directory tree.

pysys.constants.PASSED = 20

Non-failure test outcome indicating successful validation steps.

pysys.constants.PLATFORM = 'win32'

OS platform - current values are: linux, win32 (Windows), sunos (Solaris), darwin (Mac).

pysys.constants.PRECEDENT = [27, 26, 25, 24, 23, 22, 21, 20]

Lists all test outcomes in order of precedence. If a test has multiple outcomes, the one that appears first in this list takes precedence over any other.

class pysys.constants.PrintLogs[source]

Bases: enum.Enum

Enumeration constants that specify when run.log contents are printed to the stdout console.

In all cases a summary of failures is printed at the end, and the user can always look at the run.log inside each output directory if they need more detail.

ALL = 'PrintLogs.ALL'

Detailed run.log output is always printed to the stdout console, for both passed and failed testcases.

FAILURES = 'PrintLogs.FAILURES'

Detailed run.log output is only printed to the stdout console for failed testcases.

NONE = 'PrintLogs.NONE'

Detailed run.log output is not printed to the stdout console.

pysys.constants.SKIPPED = 27

Non-failure test outcome indicating that the test was ignored as it is not currently required to run on this platform/mode. See pysys.process.user.ProcessUser.skipTest.

pysys.constants.TIMEDOUT = 24

Failure test outcome indicating that the test timed out while performing execution or validation operations.

pysys.constants.TIMEOUTS = {'ManualTester': 1800, 'WaitForAvailableTCPPort': 1200, 'WaitForFile': 30, 'WaitForProcess': 600, 'WaitForProcessStop': 30, 'WaitForSignal': 60, 'WaitForSocket': 60}

Default timeouts used for various operations.

Each timeout is given as a floating point number of seconds.

These timeouts can be customized from runner.setup() if needed (but never change them from within individual testcases).