#NEWLINE# def test_enter_exit( self ) : #NEWLINE# #INDENT# if q . abstract : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# q = self . Queue ( 'test_enter_exit' ) #NEWLINE# q . close = Mock ( ) #NEWLINE# self . assertIs ( q . __enter__ ( ) , q ) #NEWLINE# q . __exit__ ( ) #NEWLINE# q . close . assert_called_with ( )