def test_read_no_header_names():
 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.FixedWidth, guess=False, header_start=None, data_start=0, names=('Name', 'Phone', 'TCP'))
 assert_equal(tuple(dat.dtype.names), ('Name', 'Phone', 'TCP'))
 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_names ( ) : 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 . FixedWidth , guess = False , header_start = None , data_start = 0 , names = ( 'Name' , 'Phone' , 'TCP' ) ) assert_equal ( tuple ( dat . dtype . names ) , ( 'Name' , 'Phone' , 'TCP' ) ) 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 with col names provided .