TestCenter Reference
TestSupport.TestHelper Namespace Reference

Classes

class  CancelTestException
 
class  ExpectInfos
 
class  SetLoggingCallerStackFrame
 
class  SpecialMessage
 Stores an additional message (usually the unformatted version) with a log message. More...
 
class  SuppressedErrors
 
class  SuppressedWarnings
 Helper object to supress warnings. More...
 
class  TC_ChangeSet
 
class  TestHelper
 Singleton for important helper facilities for the different tests. More...
 

Functions

 emitSpecialMessage (loggingMethod, file, line, type, message, escapeHtml=True, formattedStack="")
 
 emitSpecialCommand (file, line, type, fileList, message, escapeHtml=True)
 
 UseStackFrameFromCallerForLogging (func)
 This decorator is used to specify the stack frame that is used to detect the location while logging.
 
 regexpToString (exp)
 

Variables

bool _mlab_do_not_reload = True
 
bool gEnablePrettyLogging = False
 
bool gLogInfoMessages = True
 
 IncreaseLoggingStackDepthDecorator = UseStackFrameFromCallerForLogging
 

Function Documentation

◆ emitSpecialCommand()

TestSupport.TestHelper.emitSpecialCommand (   file,
  line,
  type,
  fileList,
  message,
  escapeHtml = True 
)

Definition at line 96 of file TestHelper.py.

◆ emitSpecialMessage()

TestSupport.TestHelper.emitSpecialMessage (   loggingMethod,
  file,
  line,
  type,
  message,
  escapeHtml = True,
  formattedStack = "" 
)

Definition at line 68 of file TestHelper.py.

◆ regexpToString()

◆ UseStackFrameFromCallerForLogging()

TestSupport.TestHelper.UseStackFrameFromCallerForLogging (   func)

This decorator is used to specify the stack frame that is used to detect the location while logging.

It uses the stack frame that calls the given function. Functions with this decorator can call each other recursively. The first stack frame of such a recursion is then used.

Definition at line 123 of file TestHelper.py.

Variable Documentation

◆ _mlab_do_not_reload

bool TestSupport.TestHelper._mlab_do_not_reload = True
protected

Definition at line 36 of file TestHelper.py.

◆ gEnablePrettyLogging

bool TestSupport.TestHelper.gEnablePrettyLogging = False

Definition at line 38 of file TestHelper.py.

◆ gLogInfoMessages

bool TestSupport.TestHelper.gLogInfoMessages = True

Definition at line 39 of file TestHelper.py.

◆ IncreaseLoggingStackDepthDecorator

TestSupport.TestHelper.IncreaseLoggingStackDepthDecorator = UseStackFrameFromCallerForLogging

Definition at line 136 of file TestHelper.py.