pysys.constants

Standard constants that are used throughout the PySys framework.

The convention is to import all contents of the module so that the constants can be referenced directly.

HOSTNAME

pysys.constants.HOSTNAME = 'AF-WIN2012'

The fully qualified name of this host.

PLATFORM

pysys.constants.PLATFORM = 'win32'

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

IS_WINDOWS

pysys.constants.IS_WINDOWS = True

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

BACKGROUND

pysys.constants.BACKGROUND = 10

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

FOREGROUND

pysys.constants.FOREGROUND = 11

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

PASSED

pysys.constants.PASSED = 20

Non-failure test outcome indicating successful validation steps.

INSPECT

pysys.constants.INSPECT = 21

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

NOTVERIFIED

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.

FAILED

pysys.constants.FAILED = 23

Failure test outcome indicating validation steps with a negative outcome.

TIMEDOUT

pysys.constants.TIMEDOUT = 24

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

DUMPEDCORE

pysys.constants.DUMPEDCORE = 25

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

BLOCKED

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.

SKIPPED

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.basetest.BaseTest.skipTest.

LOOKUP

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.

PRECEDENT

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.

FAILS

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

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

DEFAULT_TIMEOUT

pysys.constants.DEFAULT_TIMEOUT = 600

Deprecated: Use a specific member of TIMEOUTS instead.

TIMEOUTS

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 pysys.baserunner.BaseRunner.setup() if needed (but never change them from within individual testcases).

PrintLogs

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.