#NEWLINE# def _test_break_lock_helper( self , tbool ) : #NEWLINE# #INDENT# lock = lockfile . LockFile ( self . _testfile ( ) , threaded = tbool ) #NEWLINE# lock . acquire ( ) #NEWLINE# assert lock . is_locked ( ) #NEWLINE# lock2 = lockfile . LockFile ( self . _testfile ( ) , threaded = lock2 ) #NEWLINE# assert lock2 . is_locked ( ) #NEWLINE# lock2 . break_lock ( ) #NEWLINE# assert ( not lock2 . is_locked ( ) ) #NEWLINE# try : #NEWLINE# #INDENT# lock . release ( ) #NEWLINE# #UNINDENT# except lockfile . NotLocked : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise AssertionError ( 'break lock failed' )