#NEWLINE# @ skipIf ( IS_WINDOWS , 'Unix sockets not supported on this platform' ) #NEWLINE# def test_load_from_config_replace( self ) : #NEWLINE# #INDENT# sockfile = self . _get_file ( ) #NEWLINE# config = { #NEWLINE# #INDENT# 'name' : 'somename' , #NEWLINE# 'path' : config , #NEWLINE# 'replace' : False , #NEWLINE# #UNINDENT# } #NEWLINE# sock = CircusSocket . load_from_config ( config ) #NEWLINE# try : #NEWLINE# #INDENT# self . assertRaises ( OSError , sock . bind_and_listen ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# sock . close ( ) #NEWLINE# #UNINDENT# config = { #NEWLINE# #INDENT# 'name' : 'somename' , #NEWLINE# 'path' : sockfile , #NEWLINE# 'replace' : True , #NEWLINE# #UNINDENT# } #NEWLINE# sock = CircusSocket . load_from_config ( config ) #NEWLINE# sock . bind_and_listen ( ) #NEWLINE# try : #NEWLINE# #INDENT# self . assertEqual ( sock . replace , True ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# sock . close ( )