#NEWLINE# def test_acquire_contended( self ) : #NEWLINE# #INDENT# lock = self . locktype ( ) #NEWLINE# lock . acquire ( ) #NEWLINE# N = 5 #NEWLINE# def f( ) : #NEWLINE# #INDENT# lock . acquire ( ) #NEWLINE# lock . release ( ) #NEWLINE# #UNINDENT# b = Bunch ( f , N ) #NEWLINE# b . wait_for_started ( ) #NEWLINE# _wait ( ) #NEWLINE# self . assertEqual ( len ( b . finished ) , 0 ) #NEWLINE# lock . release ( ) #NEWLINE# b . wait_for_finished ( ) #NEWLINE# self . assertEqual ( len ( b . finished ) , N )