#NEWLINE# def _test_is_locked_helper( self , tbool ) : #NEWLINE# #INDENT# lock = lockfile . LockFile ( self . _testfile ( ) , threaded = tbool ) #NEWLINE# lock . acquire ( timeout = 2 ) #NEWLINE# assert lock . is_locked ( ) #NEWLINE# lock . release ( ) #NEWLINE# assert ( not lock . is_locked ( ) ) , 'still locked after release!'