#NEWLINE# def test_listen_tcp_invalid_port_range( self ) : #NEWLINE# #INDENT# reactor = MemoryReactor ( ) #NEWLINE# with pytest . raises ( Exception ) as info : #NEWLINE# #INDENT# listen_tcp ( [ 1 , 2 , 3 ] , self . host , Factory , reactor = reactor ) #NEWLINE# #UNINDENT# assert ( info . value . message == 'invalid portrange: [1, 2, 3]' )