def test_read_no_header_autocolumn_NoHeader():
 table = '\n|  John  | 555-1234 |192.168.1.10|\n|  Mary  | 555-2134 |192.168.1.12|\n|   Bob  | 555-4527 | 192.168.1.9|\n'
 dat = ascii.read(table, Reader=ascii.FixedWidthNoHeader)
 assert_equal(tuple(dat.dtype.names), ('col1', 'col2', 'col3'))
 assert_equal(dat[1][0], 'Mary')
 assert_equal(dat[0][1], '555-1234')
 assert_equal(dat[2][2], '192.168.1.9')

def test_read_no_header_autocolumn_NoHeader ( ) : table = '\n|  John  | 555-1234 |192.168.1.10|\n|  Mary  | 555-2134 |192.168.1.12|\n|   Bob  | 555-4527 | 192.168.1.9|\n' dat = ascii . read ( table , Reader = ascii . FixedWidthNoHeader ) assert_equal ( tuple ( dat . dtype . names ) , ( 'col1' , 'col2' , 'col3' ) ) assert_equal ( dat [ 1 ] [ 0 ] , 'Mary' ) assert_equal ( dat [ 0 ] [ 1 ] , '555-1234' ) assert_equal ( dat [ 2 ] [ 2 ] , '192.168.1.9' )
table with no header row and auto-column naming .