#NEWLINE# def sendexpectcmd( self , cmd ) : #NEWLINE# #INDENT# self . sendline ( cmd ) #NEWLINE# self . expect_exact ( '\r\n' ) #NEWLINE# def remove_control( s ) : #NEWLINE# #INDENT# return s . translate ( None , '' . join ( map ( chr , ( range ( ( 32 + 1 ) ) + [ 127 ] ) ) ) ) #NEWLINE# #UNINDENT# assert ( remove_control ( self . before ) == remove_control ( cmd ) )