Module ImportFrom alias alias Import alias ClassDef bases body FunctionDef arguments args NameParam defaults body Return Str decorator_list decorator_list ClassDef bases body FunctionDef arguments args NameParam defaults body Return Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad Str handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr NameLoad Str Return Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call NameLoad Num handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr NameLoad Str Return Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore Call NameLoad Str handlers ExceptHandler body Expr Call AttributeLoad NameLoad attr NameLoad Str Return Expr Call AttributeLoad NameLoad attr NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad handlers ExceptHandler body Return Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Return Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str Return Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body If CompareGtE AttributeLoad NameLoad attr TupleLoad Num Num body Return TryExcept body Raise Str handlers ExceptHandler type Str body Return ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Return Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assign NameStore BinOpDiv Num Num handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Return Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad BinOpMod Str SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Raise Call NameLoad Str decorator_list TryExcept body Expr Call NameLoad handlers ExceptHandler body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Assign NameStore Num While AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr AugAssignAdd NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Num Str orelse Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryFinally body TryExcept body Pass handlers ExceptHandler type NameLoad name NameStore body Pass ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Pass ExceptHandler body Pass finalbody Pass TryFinally body TryExcept body Assign NameStore Num handlers ExceptHandler body Assign NameStore Num orelse Assign NameStore Num finalbody Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Num TryFinally body TryExcept body Assign NameStore Num Raise Call NameLoad Str handlers ExceptHandler body Assign NameStore Num orelse Assign NameStore Num finalbody Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Num TryFinally body Assign NameStore Num finalbody Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Num TryFinally body TryExcept body Assign NameStore Num TryFinally body TryExcept body Assign NameStore Num handlers ExceptHandler body Assign NameStore Num orelse Assign NameStore Num finalbody Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num handlers ExceptHandler body Assign NameStore Num orelse Assign NameStore Num finalbody Expr Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Num Expr Call AttributeLoad NameLoad attr TryExcept body Raise Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad SubscriptLoad AttributeLoad NameLoad attr Index Num attr Str SubscriptLoad AttributeLoad NameLoad attr Index Num ExceptHandler body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Num TryExcept body Raise NameLoad Str Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str ExceptHandler body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str SubscriptLoad NameLoad Index Num Assign NameStore SubscriptLoad NameLoad Index Num TryExcept body Raise handlers ExceptHandler body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad SubscriptLoad NameLoad Index Num attr Index Num Assign NameStore ListLoad Call NameLoad Str Call NameLoad Str Call NameLoad Str Call NameLoad Str Assign NameStore ListLoad For NameStore NameLoad body TryExcept body Raise NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type TupleLoad NameLoad NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str orelse If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str orelse Expr Call AttributeLoad NameLoad attr Str ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str ExceptHandler body Assign NameStore SubscriptLoad Call AttributeLoad NameLoad attr Index Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Call NameLoad NameLoad TryExcept body TryExcept body Raise Call NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Raise Call NameLoad Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad ExceptHandler body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body TryExcept body Assert NameLoad Expr Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad TryExcept body Assert NameLoad Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Assert NameLoad Str Expr Call AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr SubscriptLoad AttributeLoad NameLoad attr Index Num Str decorator_list decorator_list
N/A UnitTest UnitTest PY27_BEHAVIOUR N/A sys MyException N/A N/A __str__ N/A N/A self N/A N/A N/A MyException N/A N/A MyException2 N/A N/A __str__ N/A N/A self N/A N/A N/A MyException2 N/A N/A ExceptionTest N/A UnitTest N/A testTypeError N/A N/A self N/A N/A N/A N/A N/A N/A TypeError fred N/A N/A N/A N/A N/A N/A self assertTrue True the exception should have happened N/A N/A N/A N/A self assertTrue False the exception should have happened N/A testExceptionOrdTrigger N/A N/A self N/A N/A N/A N/A N/A x N/A ord 5 N/A N/A N/A N/A N/A N/A self assertTrue True the exception should have happened N/A N/A N/A N/A self assertTrue False mustn't be able to do ord() on a number N/A testExceptionOrdNoTrigger N/A N/A self N/A N/A N/A N/A N/A x N/A ord 5 N/A N/A N/A N/A N/A N/A self assertTrue False the exception shouldn't have happened N/A N/A N/A N/A self assertTrue True the exception should have happened N/A testRaiseException N/A N/A self N/A N/A N/A N/A N/A N/A MyException N/A N/A N/A N/A N/A N/A N/A self fail MyException was not raised N/A testCatchClassException N/A N/A self N/A N/A N/A N/A N/A N/A MyException N/A N/A N/A MyException N/A e N/A N/A N/A N/A self assertEqual N/A N/A e __str__ MyException Caught exception does not match N/A N/A N/A N/A self fail MyException was not caught or raised N/A testCatchMultiClassException N/A N/A self N/A N/A N/A N/A N/A N/A MyException N/A N/A N/A N/A MyException MyException2 N/A e N/A N/A N/A N/A self assertEqual N/A N/A e __str__ MyException Caught exception does not match N/A N/A N/A N/A self fail MyException was not caught or raised N/A testCatchStringException N/A N/A self N/A N/A N/A N/A N/A sys version_info N/A 2 6 N/A N/A N/A N/A N/A test N/A N/A N/A test N/A N/A N/A N/A TypeError N/A e N/A N/A N/A N/A self fail e N/A N/A N/A self fail "test" was not caught or raised N/A testBuiltInException N/A N/A self N/A N/A N/A N/A N/A N/A LookupError hoschi N/A N/A N/A LookupError N/A err N/A N/A N/A N/A self assertEqual N/A N/A err __class__ __name__ LookupError N/A N/A N/A N/A self fail LookupError should be caught N/A testZeroDivisionError N/A N/A self N/A N/A N/A N/A N/A v N/A 1 0 N/A N/A N/A ZeroDivisionError N/A err N/A N/A N/A N/A self assertEqual N/A N/A err __class__ __name__ ZeroDivisionError N/A N/A N/A N/A self fail ZeroDivisionError should be caught bug #265 N/A testStrReprSingleArg N/A N/A self N/A N/A N/A args N/A test N/A e N/A BaseException args N/A N/A N/A self assertEqual N/A N/A e args N/A 0 N/A args N/A 0 N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e BaseException('test',) N/A e N/A Exception args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e Exception('test',) N/A e N/A TypeError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e TypeError('test',) N/A e N/A StandardError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e StandardError('test',) N/A e N/A LookupError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e LookupError('test',) N/A e N/A KeyError args N/A N/A N/A self assertEqual N/A str e N/A '%s' N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e KeyError('test',) N/A e N/A AttributeError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e AttributeError('test',) N/A e N/A NameError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e NameError('test',) N/A e N/A ValueError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e ValueError('test',) N/A e N/A IndexError args N/A N/A N/A self assertEqual N/A str e N/A args N/A 0 N/A N/A N/A self assertEqual N/A repr e IndexError('test',) N/A test_exc_info_traceback N/A N/A self N/A N/A func N/A N/A N/A N/A N/A N/A ValueError Baaa! N/A N/A N/A N/A N/A func N/A N/A N/A N/A tb N/A N/A N/A sys exc_info N/A 2 N/A count 1 N/A N/A tb tb_next N/A N/A tb N/A tb tb_next N/A count 1 N/A N/A N/A self assertEqual count 2 sys.exc_info() traceback must be relative to caller N/A N/A N/A N/A self fail Exception expected N/A testSyntax N/A N/A self N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A KeyError N/A e N/A N/A N/A N/A N/A TypeError LookupError N/A e N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A N/A a 1 N/A N/A N/A N/A a 2 N/A N/A a 3 N/A N/A N/A N/A self assertEqual a 3 N/A a 4 N/A N/A N/A self assertEqual a 4 N/A N/A N/A N/A N/A a 11 N/A N/A KeyError test N/A N/A N/A N/A a 12 N/A N/A a 13 N/A N/A N/A N/A self assertEqual a 12 N/A a 14 N/A N/A N/A self assertEqual a 14 N/A N/A N/A a 1 N/A N/A a 2 N/A N/A N/A self assertEqual a 2 N/A N/A N/A N/A N/A a 1 N/A N/A N/A N/A N/A b 1 N/A N/A N/A N/A b 2 N/A N/A b 3 N/A N/A N/A N/A self assertEqual b 3 N/A b 4 N/A N/A N/A N/A a 2 N/A N/A a 3 N/A N/A N/A N/A self assertEqual a 3 N/A a 4 N/A N/A N/A self assertEqual a 4 N/A N/A N/A self assertEqual b 4 N/A N/A N/A sys exc_clear N/A N/A N/A N/A N/A N/A self fail No error raised on 'raise' after 'sys.exc_clear()' N/A N/A N/A TypeError N/A e N/A N/A N/A N/A self assertTrue N/A N/A N/A N/A e args N/A 0 startswith exceptions must be N/A N/A e args N/A 0 N/A N/A N/A e N/A N/A sys exc_info N/A N/A N/A self fail N/A TypeError expected, got %s N/A e N/A 0 N/A N/A N/A KeyError test N/A N/A N/A self fail No error raised N/A N/A N/A KeyError N/A e N/A N/A N/A N/A self assertEqual N/A N/A e args N/A 0 test N/A N/A N/A e N/A N/A sys exc_info N/A N/A N/A self fail N/A KeyError expected, got %s N/A e N/A 0 N/A e N/A e N/A 1 N/A N/A N/A N/A N/A N/A N/A err N/A N/A sys exc_info N/A N/A N/A self assertEqual N/A N/A e args N/A 0 N/A N/A N/A err N/A 1 args N/A 0 N/A raise_errors N/A N/A KeyError KeyError N/A TypeError TypeError N/A AttributeError AttributeError N/A LookupError LookupError N/A raised_errors N/A N/A err raise_errors N/A N/A N/A N/A err N/A N/A N/A self fail Failed to raise exception N/A N/A N/A N/A KeyError TypeError N/A e1 N/A N/A N/A N/A raised_errors append e1 N/A N/A isinstance e1 KeyError N/A N/A N/A N/A self assertEqual N/A N/A e1 args N/A 0 KeyError N/A N/A N/A isinstance e1 TypeError N/A N/A N/A N/A self assertEqual N/A N/A e1 args N/A 0 TypeError N/A N/A N/A N/A self fail neither KeyError nor TypeError in except (KeyError, TypeError) N/A N/A AttributeError N/A e2 N/A N/A N/A N/A raised_errors append e2 N/A N/A N/A self assertEqual N/A N/A e2 args N/A 0 AttributeError N/A N/A N/A e3 N/A N/A N/A sys exc_info N/A 1 N/A N/A N/A raised_errors append e3 N/A N/A N/A self assertEqual N/A N/A e3 args N/A 0 LookupError N/A N/A N/A self assertEqual N/A len raised_errors N/A len raise_errors N/A N/A N/A N/A N/A N/A TypeError TypeError N/A N/A N/A KeyError N/A e N/A N/A N/A N/A self fail Got KeyError N/A N/A N/A self fail TypeError should not be ignored N/A N/A N/A TypeError N/A e N/A N/A N/A N/A self assertEqual N/A N/A e args N/A 0 TypeError N/A testCatchSuperException N/A N/A self N/A N/A N/A N/A N/A N/A TypeError test N/A N/A N/A Exception N/A e N/A N/A N/A N/A self assertTrue True N/A N/A N/A N/A N/A self fail Failed to catch exception: bug #254 N/A testAssertionError N/A N/A self N/A N/A N/A N/A N/A True N/A N/A N/A self assertTrue True N/A N/A N/A AssertionError N/A e N/A N/A N/A N/A self fail N/A Got an unexpected assertion error: %r e N/A N/A N/A False N/A N/A N/A self fail AssertionError expected N/A N/A N/A AssertionError N/A e N/A N/A N/A N/A self assertTrue True N/A N/A N/A False reason N/A N/A N/A self fail AssertionError expected N/A N/A N/A AssertionError N/A e N/A N/A N/A N/A self assertEqual N/A N/A e args N/A 0 reason N/A N/A