#NEWLINE# def test_describe_generator( spawntablegen ) : #NEWLINE# #INDENT# ( table , gen , c ) = spawntablegen #NEWLINE# generator_output = [ 'id |   name | tabname | metamodel' , '---+--------+---------+----------' , ' 1 | dha_cc |     dha |  crosscat' ] #NEWLINE# c . sendexpectcmd ( ( '.describe generator %s' % ( table , ) ) ) #NEWLINE# c . expect_lines ( [ ( 'No such generator: %s' % ( repr ( table ) , ) ) ] ) #NEWLINE# c . expect_prompt ( ) #NEWLINE# c . sendexpectcmd ( ( '.describe generator %s' % ( gen , ) ) ) #NEWLINE# c . expect_lines ( generator_output ) #NEWLINE# c . expect_prompt ( ) #NEWLINE# c . sendexpectcmd ( ( 'alter table %s set default generator to %s;' % ( table , gen ) ) ) #NEWLINE# c . expect_prompt ( ) #NEWLINE# c . sendexpectcmd ( ( '.describe generator %s' % ( table , ) ) ) #NEWLINE# c . expect_lines ( generator_output ) #NEWLINE# c . expect_prompt ( )