def test_latex_no_trailing_backslash():
 lines = '\n\\begin{table}\n\\begin{tabular}{ccc}\na & b & c \\\\\n1 & 1.0 & c \\\\ % comment\n3\\% & 3.0 & e  % comment\n\\end{tabular}\n\\end{table}\n'
 dat = ascii.read(lines, format='latex')
 assert (dat.colnames == ['a', 'b', 'c'])
 assert np.all((dat['a'] == ['1', '3\\%']))
 assert np.all((dat['c'] == ['c', 'e']))

def test_latex_no_trailing_backslash ( ) : lines = '\n\\begin{table}\n\\begin{tabular}{ccc}\na & b & c \\\\\n1 & 1.0 & c \\\\ % comment\n3\\% & 3.0 & e  % comment\n\\end{tabular}\n\\end{table}\n' dat = ascii . read ( lines , format = 'latex' ) assert ( dat . colnames == [ 'a' , 'b' , 'c' ] ) assert np . all ( ( dat [ 'a' ] == [ '1' , '3\\%' ] ) ) assert np . all ( ( dat [ 'c' ] == [ 'c' , 'e' ] ) )
test that latex/aastex file with no trailing backslash can be read .