TestCenter Reference
|
Package to provide logging functions. More...
Functions | |
setStopped (stopped) | |
info (message, stack=False, type='', depth=0) | |
Put an info message to the log. | |
infoHTML (message, type='', depth=0) | |
Put an info message to the log while interpreting HTML. | |
warning (message, stack=False, type='', depth=0) | |
Put a warning to the log. | |
warningHTML (message, type='', depth=0) | |
Put a warning to the log while interpreting HTML. | |
error (message, stack=False, type='', depth=0) | |
Put an error to the log. | |
errorHTML (message, type='', depth=0) | |
Put an error to the log while interpreting HTML. | |
showImage (description, *files) | |
Put the ImageShow command to the log. | |
showFile (description, *files) | |
Put the FileShow command to the log. | |
showDiff (description, fromLines, toLines, showOnlyContextOfDiff=False, numberOfContextLines=10) | |
Creates a HTML diff from the two files and puts the FileShow command to the log. | |
getStack (depth=0) | |
Get the current stack. | |
Variables | |
bool | gStopOnFirstError = False |
bool | gStopped = False |
Package to provide logging functions.
TestSupport.Logging.error | ( | message, | |
stack = False, | |||
type = '', | |||
depth = 0 ) |
Put an error to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 119 of file Logging.py.
TestSupport.Logging.errorHTML | ( | message, | |
type = '', | |||
depth = 0 ) |
Put an error to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 130 of file Logging.py.
TestSupport.Logging.getStack | ( | depth = 0 | ) |
Get the current stack.
There is the possibility to remove a given number of stack lines at the end of the list. This can be useful to remove unneccesary lines.
depth | Number of stack lines to exclude. |
Definition at line 213 of file Logging.py.
TestSupport.Logging.info | ( | message, | |
stack = False, | |||
type = '', | |||
depth = 0 ) |
Put an info message to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 76 of file Logging.py.
TestSupport.Logging.infoHTML | ( | message, | |
type = '', | |||
depth = 0 ) |
Put an info message to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 87 of file Logging.py.
TestSupport.Logging.setStopped | ( | stopped | ) |
Definition at line 33 of file Logging.py.
TestSupport.Logging.showDiff | ( | description, | |
fromLines, | |||
toLines, | |||
showOnlyContextOfDiff = False, | |||
numberOfContextLines = 10 ) |
Creates a HTML diff from the two files and puts the FileShow command to the log.
This command can be used to display the diff of two files. It will appear as link in the log file such that they can be downloaded.
description | A string that describes the diff. |
fromLines | The array containing the lines of the left string or a filename of an existing file. |
toLines | The array containing the lines of the right string or a filename of an existing file. |
showOnlyContextOfDiff | If true, then only the context lines around the diff are shown, otherwise the whole content is shown. |
numberOfContextLines | The number of context line only the diff context is shown. |
Definition at line 185 of file Logging.py.
References TestSupport.Logging.showFile().
TestSupport.Logging.showFile | ( | description, | |
* | files ) |
Put the FileShow command to the log.
This command can be used to display a set of files. They will appear as links in the log file such that they can be downloaded.
description | A message show with the images. |
files | Arbitrary number of arguments treated as file names. |
Definition at line 161 of file Logging.py.
Referenced by TestSupport.Logging.showDiff().
TestSupport.Logging.showImage | ( | description, | |
* | files ) |
Put the ImageShow command to the log.
This command can be used to display a set of images in the report.
description | A message show with the images. |
files | Arbitrary number of arguments treated as file names. |
Definition at line 140 of file Logging.py.
TestSupport.Logging.warning | ( | message, | |
stack = False, | |||
type = '', | |||
depth = 0 ) |
Put a warning to the log.
message | The message to print. |
stack | Determines whether a stack trace is included. |
type | The type of message. Used internally to identify messages. |
Definition at line 97 of file Logging.py.
TestSupport.Logging.warningHTML | ( | message, | |
type = '', | |||
depth = 0 ) |
Put a warning to the log while interpreting HTML.
message | The message to print. Any HTML tags inside are parsed as such. |
type | The type of message. Used internally to identify messages. |
Definition at line 108 of file Logging.py.
bool TestSupport.Logging.gStopOnFirstError = False |
Definition at line 29 of file Logging.py.
bool TestSupport.Logging.gStopped = False |
Definition at line 31 of file Logging.py.