def assert_has_n_columns(output, n, sep=' DCTB '):
 n = int(n)
 first_line = get_first_line(output)
 assert (first_line is not None), ('Was expecting output with %d columns, but output was empty.' % n)
 assert (len(first_line.split(sep)) == n), ('Output does not have %d columns.' % n)

def assert_has_n_columns ( output , n , sep = ' DCTB ' ) : n = int ( n ) first_line = get_first_line ( output ) assert ( first_line is not None ) , ( 'Was expecting output with %d columns, but output was empty.' % n ) assert ( len ( first_line . split ( sep ) ) == n ) , ( 'Output does not have %d columns.' % n )
asserts the tabular output contains n columns .