Back to index

python3.2  3.2.2
Classes | Functions | Variables
unittest.signals Namespace Reference

Classes

class  _InterruptHandler

Functions

def registerResult
def removeResult
def installHandler
def removeHandler

Variables

 __unittest = True
tuple _results = weakref.WeakKeyDictionary()
 _interrupt_handler = None

Function Documentation

Definition at line 35 of file signals.py.

00035 
00036 def installHandler():
00037     global _interrupt_handler
00038     if _interrupt_handler is None:
00039         default_handler = signal.getsignal(signal.SIGINT)
00040         _interrupt_handler = _InterruptHandler(default_handler)
00041         signal.signal(signal.SIGINT, _interrupt_handler)
00042 

Here is the caller graph for this function:

Definition at line 28 of file signals.py.

00028 
00029 def registerResult(result):
00030     _results[result] = 1

Here is the caller graph for this function:

def unittest.signals.removeHandler (   method = None)

Definition at line 43 of file signals.py.

00043 
00044 def removeHandler(method=None):
00045     if method is not None:
00046         @wraps(method)
00047         def inner(*args, **kwargs):
00048             initial = signal.getsignal(signal.SIGINT)
00049             removeHandler()
00050             try:
00051                 return method(*args, **kwargs)
00052             finally:
00053                 signal.signal(signal.SIGINT, initial)
00054         return inner
00055 
00056     global _interrupt_handler
00057     if _interrupt_handler is not None:
00058         signal.signal(signal.SIGINT, _interrupt_handler.default_handler)

Here is the call graph for this function:

Definition at line 31 of file signals.py.

00031 
00032 def removeResult(result):
00033     return bool(_results.pop(result, None))


Variable Documentation

Definition at line 6 of file signals.py.

Definition at line 34 of file signals.py.

Definition at line 27 of file signals.py.