#NEWLINE# def test_batch_file( ) : #NEWLINE# #INDENT# with tempfile . NamedTemporaryFile ( prefix = 'bayeslite-shell' ) as temp : #NEWLINE# #INDENT# with open ( temp . name , 'w' ) as f : #NEWLINE# #INDENT# f . write ( 'select 0;' ) #NEWLINE# #UNINDENT# c = spawn_bayeslite ( ( "-f '%s' -b -m" % ( temp . name , ) ) ) #NEWLINE# c . delaybeforesend = 0 #NEWLINE# c . expect_lines ( [ '0' , '-' , '0' ] ) #NEWLINE# c . expect ( pexpect . EOF ) #NEWLINE# assert ( c . before == '' )