@pytest.mark.parametrize('parallel', [True, False])
def test_quoted_fields(parallel, read_basic):
 if parallel:
  pytest.xfail('Multiprocessing can fail with quoted fields')
 text = '\n"A B" C D\n1.5 2.1 -37.1\na b "   c\n d"\n'
 table = read_basic(text, parallel=parallel)
 expected = Table([['1.5', 'a'], ['2.1', 'b'], ['-37.1', 'cd']], names=('A B', 'C', 'D'))
 assert_table_equal(table, expected)
 table = read_basic(text.replace('"', "'"), quotechar="'", parallel=parallel)
 assert_table_equal(table, expected)

@ pytest . mark . parametrize ( 'parallel' , [ True , False ] ) def test_quoted_fields ( parallel , read_basic ) : if parallel : pytest . xfail ( 'Multiprocessing can fail with quoted fields' ) text = '\n"A B" C D\n1.5 2.1 -37.1\na b "   c\n d"\n' table = read_basic ( text , parallel = parallel ) expected = Table ( [ [ '1.5' , 'a' ] , [ '2.1' , 'b' ] , [ '-37.1' , 'cd' ] ] , names = ( 'A B' , 'C' , 'D' ) ) assert_table_equal ( table , expected ) table = read_basic ( text . replace ( '"' , "'" ) , quotechar = "'" , parallel = parallel ) assert_table_equal ( table , expected )
the character quotechar should denote the start of a field which can contain the field delimiter and newlines .