ape.parts.dummy.dummy.CrashDummy

class ape.parts.dummy.dummy.CrashDummy(error, error_message='CrashDummy is crashing.', function='__call__', *args, **kwargs)

A dummy that crashes

CrashTestDummy Constructor

Param:
  • error: an exception (object) to raise
  • error_message: string to pass to error on raising
  • function: which function to raise error (__call__, check_rep, close, __init__)
__init__(error, error_message='CrashDummy is crashing.', function='__call__', *args, **kwargs)

CrashTestDummy Constructor

Param:
  • error: an exception (object) to raise
  • error_message: string to pass to error on raising
  • function: which function to raise error (__call__, check_rep, close, __init__)

Methods

__init__(error[, error_message, function]) CrashTestDummy Constructor
log_error(error[, message]) Logs the error in bold red

Attributes

logger
return:A logging object.
check_rep()

crashes on check_rep() if that’s the function

close()

Crashes if close is the function

log_error(error, message='')

Logs the error in bold red

Param:
  • error: error type (prefix in red and bold)
  • message: descriptive message (red but not bold)
logger
Returns:A logging object.

Navigation