Module Import alias Import alias Import alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str Import alias Import alias Import alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body With NameLoad body Print NameLoad decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body With AttributeLoad NameLoad attr body AugAssignAdd AttributeStore NameLoad attr Num Expr Call NameLoad BinOpMod Str AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad AttributeLoad NameLoad attr AugAssignAdd AttributeStore NameLoad attr Num AugAssignAdd AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam defaults body With AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr Num Expr Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str NameLoad With AttributeLoad NameLoad attr body AugAssignSub AttributeStore NameLoad attr Num If BoolOpAnd CompareEq AttributeLoad NameLoad attr NameLoad CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Str If CompareNotIn AttributeLoad NameLoad attr TupleLoad Str Str Str body Return Assign NameStore NameLoad TryExcept body Expr Call AttributeLoad NameLoad attr Num handlers ExceptHandler type NameLoad body Expr Call NameLoad Str ExceptHandler type AttributeLoad NameLoad attr body Assign NameStore NameLoad Expr Call NameLoad Str If NameLoad body Assign NameStore Str For NameStore TupleLoad Num Num Num body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad BinOpMod NameLoad NameLoad Expr Call NameLoad BinOpMod Str NameLoad For NameStore TupleLoad Num Num body Expr Call NameLoad BinOpMod Str NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Str Expr Call AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad While UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpAdd NameLoad Num Expr Call AttributeLoad NameLoad attr Assign NameStore ListLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad Lambda arguments args NameParam defaults Call AttributeLoad NameLoad attr NameLoad Delete NameDel While UnaryOpNot NameLoad body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr Raise NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body TryExcept body Raise NameLoad handlers ExceptHandler type NameLoad body Pass Expr Call NameLoad NameLoad NameLoad decorator_list Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr With Call AttributeLoad NameLoad attr Str NameStore body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Expr Call AttributeLoad NameLoad attr While CompareGt Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases body FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpAdd AttributeLoad NameLoad attr Num If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Assign AttributeStore NameLoad attr BinOpSub AttributeLoad NameLoad attr Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr BinOpSub AttributeLoad NameLoad attr Num If CompareEq AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad Expr Call NameLoad Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body For NameStore Call NameLoad NameLoad body If CompareEq NameLoad Num body Assign NameStore Num orelse With AttributeLoad NameLoad attr body Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr Num Expr Call NameLoad BinOpMod Str TupleLoad NameLoad Call NameLoad BinOpMult NameLoad Num Expr Call AttributeLoad NameLoad attr NameLoad Expr Call NameLoad BinOpMod Str TupleLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call NameLoad BinOpMod Str NameLoad With AttributeLoad NameLoad attr body AugAssignSub AttributeStore NameLoad attr Num Assign NameStore CompareEq AttributeLoad NameLoad attr Num If NameLoad body Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Assign NameStore AttributeLoad NameLoad attr decorator_list ClassDef bases AttributeLoad NameLoad attr body FunctionDef arguments args NameParam defaults body Assign TupleStore AttributeStore NameLoad attr AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Num If CompareEq NameLoad Num body TryFinally body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Str finalbody Expr Call AttributeLoad NameLoad attr Num orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Expr Call AttributeLoad NameLoad attr NameLoad TupleLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Str Str decorator_list Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list decorator_list FunctionDef arguments args defaults body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A os N/A unittest N/A random test support N/A thread N/A N/A support import_module _thread N/A time N/A sys N/A weakref test lock_tests N/A NUMTASKS 10 N/A NUMTRIPS 3 N/A _print_mutex N/A N/A thread allocate_lock verbose_print N/A N/A arg N/A N/A N/A Helper function for printing out debugging output. N/A N/A support verbose N/A N/A _print_mutex N/A N/A arg N/A BasicThreadTest N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A self done_mutex N/A N/A thread allocate_lock N/A N/A N/A N/A self done_mutex acquire N/A N/A self running_mutex N/A N/A thread allocate_lock N/A N/A self random_mutex N/A N/A thread allocate_lock N/A N/A self created 0 N/A N/A self running 0 N/A N/A self next_ident 0 N/A N/A ThreadRunningTests N/A BasicThreadTest N/A newtask N/A N/A self N/A N/A N/A N/A self running_mutex N/A N/A N/A self next_ident 1 N/A N/A verbose_print N/A creating task %s N/A self next_ident N/A N/A N/A thread start_new_thread N/A self task N/A N/A self next_ident N/A N/A self created 1 N/A N/A self running 1 N/A task N/A N/A self ident N/A N/A N/A N/A self random_mutex N/A N/A delay N/A N/A N/A random random 10000.0 N/A N/A verbose_print N/A task %s will run for %sus N/A ident N/A round N/A delay 1000000.0 N/A N/A N/A time sleep delay N/A N/A verbose_print N/A task %s done ident N/A N/A self running_mutex N/A N/A N/A self running 1 N/A N/A N/A N/A self created NUMTASKS N/A N/A self running 0 N/A N/A N/A N/A N/A self done_mutex release N/A test_starting_threads N/A N/A self N/A N/A N/A i N/A range NUMTASKS N/A N/A N/A N/A self newtask N/A N/A verbose_print waiting for tasks to complete... N/A N/A N/A N/A self done_mutex acquire N/A N/A verbose_print all tasks done N/A test_stack_size N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A thread stack_size 0 initial stack size is not 0 N/A N/A N/A thread stack_size 0 N/A N/A N/A self assertEqual N/A N/A thread stack_size 0 stack_size not reset to default N/A N/A N/A os name N/A nt os2 posix N/A N/A N/A tss_supported True N/A N/A N/A N/A N/A thread stack_size 4096 N/A N/A N/A ValueError N/A N/A N/A verbose_print caught expected ValueError setting stack_size(4096) N/A N/A N/A thread error N/A N/A tss_supported False N/A N/A verbose_print platform does not support changing thread stack size N/A tss_supported N/A N/A fail_msg stack_size(%d) failed - should succeed N/A tss N/A 262144 1048576 0 N/A N/A N/A N/A thread stack_size tss N/A N/A N/A self assertEqual N/A N/A thread stack_size tss N/A fail_msg tss N/A N/A verbose_print N/A successfully set stack_size(%d) tss N/A tss N/A 262144 1048576 N/A N/A N/A verbose_print N/A trying stack_size = (%d) tss N/A N/A self next_ident 0 N/A N/A self created 0 N/A i N/A range NUMTASKS N/A N/A N/A N/A self newtask N/A N/A verbose_print waiting for all tasks to complete N/A N/A N/A N/A self done_mutex acquire N/A N/A verbose_print all tasks done N/A N/A N/A thread stack_size 0 N/A test__count N/A N/A self N/A N/A N/A orig N/A N/A thread _count N/A mut N/A N/A thread allocate_lock N/A N/A N/A mut acquire N/A started N/A task N/A N/A N/A N/A N/A N/A N/A started append None N/A N/A N/A mut acquire N/A N/A N/A mut release N/A N/A N/A N/A thread start_new_thread task N/A N/A N/A started N/A N/A N/A N/A time sleep 0.01 N/A N/A N/A self assertEqual N/A N/A thread _count N/A orig 1 N/A N/A N/A mut release N/A done N/A N/A wr N/A N/A weakref ref task N/A N/A N/A _ N/A N/A N/A done append None N/A task N/A N/A done N/A N/A N/A N/A time sleep 0.01 N/A N/A N/A self assertEqual N/A N/A thread _count orig N/A test_save_exception_state_on_error N/A N/A self N/A N/A task N/A N/A N/A N/A N/A N/A N/A started release N/A SyntaxError N/A mywrite N/A N/A self N/A args N/A N/A N/A N/A ValueError N/A N/A N/A ValueError N/A N/A N/A N/A real_write self args N/A N/A c N/A N/A thread _count N/A started N/A N/A thread allocate_lock N/A N/A N/A support captured_output stderr stderr N/A N/A real_write N/A stderr write N/A N/A stderr write mywrite N/A N/A N/A started acquire N/A N/A N/A thread start_new_thread task N/A N/A N/A N/A started acquire N/A N/A N/A N/A thread _count c N/A N/A N/A N/A time sleep 0.01 N/A N/A N/A self assertIn Traceback N/A N/A stderr getvalue N/A N/A Barrier N/A N/A __init__ N/A N/A self num_threads N/A N/A N/A N/A self num_threads num_threads N/A N/A self waiting 0 N/A N/A self checkin_mutex N/A N/A thread allocate_lock N/A N/A self checkout_mutex N/A N/A thread allocate_lock N/A N/A N/A N/A self checkout_mutex acquire N/A enter N/A N/A self N/A N/A N/A N/A N/A N/A self checkin_mutex acquire N/A N/A self waiting N/A N/A self waiting 1 N/A N/A N/A self waiting N/A self num_threads N/A N/A N/A self waiting N/A N/A self num_threads 1 N/A N/A N/A N/A self checkout_mutex release N/A N/A N/A N/A N/A self checkin_mutex release N/A N/A N/A N/A self checkout_mutex acquire N/A N/A self waiting N/A N/A self waiting 1 N/A N/A N/A self waiting 0 N/A N/A N/A N/A N/A self checkin_mutex release N/A N/A N/A N/A N/A self checkout_mutex release N/A N/A BarrierTest N/A BasicThreadTest N/A test_barrier N/A N/A self N/A N/A N/A N/A self bar N/A Barrier NUMTASKS N/A N/A self running NUMTASKS N/A i N/A range NUMTASKS N/A N/A N/A N/A thread start_new_thread N/A self task2 N/A i N/A N/A verbose_print waiting for tasks to end N/A N/A N/A N/A self done_mutex acquire N/A N/A verbose_print tasks done N/A task2 N/A N/A self ident N/A N/A N/A i N/A range NUMTRIPS N/A N/A N/A ident 0 N/A N/A delay 0 N/A N/A N/A self random_mutex N/A N/A delay N/A N/A N/A random random 10000.0 N/A N/A verbose_print N/A task %s will run for %sus N/A ident N/A round N/A delay 1000000.0 N/A N/A N/A time sleep delay N/A N/A verbose_print N/A task %s entering %s N/A ident i N/A N/A N/A N/A self bar enter N/A N/A verbose_print N/A task %s leaving barrier ident N/A N/A self running_mutex N/A N/A N/A self running 1 N/A finished N/A N/A self running 0 N/A finished N/A N/A N/A N/A N/A self done_mutex release N/A N/A LockTests N/A N/A lock_tests LockTests N/A N/A locktype N/A thread allocate_lock N/A TestForkInThread N/A N/A unittest TestCase N/A setUp N/A N/A self N/A N/A N/A N/A N/A self read_fd N/A self write_fd N/A N/A os pipe N/A test_forkinthread N/A N/A self N/A N/A thread1 N/A N/A N/A N/A N/A N/A N/A pid N/A N/A os fork N/A N/A N/A RuntimeError N/A N/A N/A N/A os _exit 1 N/A N/A pid 0 N/A N/A N/A N/A N/A N/A os close N/A self read_fd N/A N/A N/A os write N/A self write_fd OK N/A N/A N/A N/A os _exit 0 N/A N/A N/A N/A os close N/A self write_fd N/A N/A N/A N/A thread start_new_thread thread1 N/A N/A N/A N/A self assertEqual N/A N/A os read N/A self read_fd 2 OK Unable to fork() in thread N/A N/A N/A unittest skipIf N/A N/A N/A sys platform startswith win This test is only appropriate for POSIX-like systems. N/A support reap_threads tearDown N/A N/A self N/A N/A N/A N/A N/A N/A N/A os close N/A self read_fd N/A N/A N/A OSError N/A N/A N/A N/A N/A N/A N/A os close N/A self write_fd N/A N/A N/A OSError N/A N/A N/A N/A test_main N/A N/A N/A N/A N/A N/A N/A support run_unittest ThreadRunningTests BarrierTest LockTests TestForkInThread N/A N/A N/A __name__ __main__ N/A N/A N/A test_main