#NEWLINE# def test_releasing_lock_no_longer_owned_raises_error( self , sr ) : #NEWLINE# #INDENT# lock = self . get_lock ( lock , 'foo' ) #NEWLINE# lock . acquire ( blocking = False ) #NEWLINE# sr . set ( 'foo' , 'a' ) #NEWLINE# with pytest . raises ( LockError ) : #NEWLINE# #INDENT# lock . release ( ) #NEWLINE# #UNINDENT# assert ( lock . local . token is None )