#NEWLINE# @ skipIf ( IS_WINDOWS , 'Unix sockets not supported on this platform' ) #NEWLINE# def test_load_from_config_blocking( self ) : #NEWLINE# #INDENT# config = { #NEWLINE# #INDENT# 'name' : 'somename' , #NEWLINE# 'host' : 'localhost' , #NEWLINE# 'port' : 0 , #NEWLINE# #UNINDENT# } #NEWLINE# sock = CircusSocket . load_from_config ( config ) #NEWLINE# self . assertEqual ( config . blocking , False ) #NEWLINE# sock . bind_and_listen ( ) #NEWLINE# self . assertTrue ( is_nonblock ( sock . fileno ( ) ) ) #NEWLINE# sock . close ( ) #NEWLINE# config = { #NEWLINE# #INDENT# 'name' : 'somename' , #NEWLINE# 'host' : 'localhost' , #NEWLINE# 'port' : 0 , #NEWLINE# 'blocking' : True , #NEWLINE# #UNINDENT# } #NEWLINE# sock = CircusSocket . load_from_config ( config ) #NEWLINE# self . assertEqual ( sock . blocking , True ) #NEWLINE# sock . bind_and_listen ( ) #NEWLINE# self . assertFalse ( is_nonblock ( sock . fileno ( ) ) ) #NEWLINE# sock . close ( )