@pytest.mark.parametrize('parallel', [True, False])
def test_read_tab(parallel, read_tab):
 if parallel:
  pytest.xfail('Multiprocessing can fail with quoted fields')
 text = '1 DCTB 2 DCTB 3\n  a DCTB  b  DCTB \n c DCTB " d\n e" DCTB   '
 table = read_tab(text, parallel=parallel)
 assert_equal(table['1'][0], '  a')
 assert_equal(table['2'][0], ' b ')
 assert (table['3'][0] is ma.masked)
 assert_equal(table['2'][1], ' d e')
 assert_equal(table['3'][1], '  ')

@ pytest . mark . parametrize ( 'parallel' , [ True , False ] ) def test_read_tab ( parallel , read_tab ) : if parallel : pytest . xfail ( 'Multiprocessing can fail with quoted fields' ) text = '1 DCTB 2 DCTB 3\n  a DCTB  b  DCTB \n c DCTB " d\n e" DCTB   ' table = read_tab ( text , parallel = parallel ) assert_equal ( table [ '1' ] [ 0 ] , '  a' ) assert_equal ( table [ '2' ] [ 0 ] , ' b ' ) assert ( table [ '3' ] [ 0 ] is ma . masked ) assert_equal ( table [ '2' ] [ 1 ] , ' d e' ) assert_equal ( table [ '3' ] [ 1 ] , '  ' )
the fast reader for tab-separated values should not strip whitespace .