@pytest.mark.parametrize('parallel', [pytest.mark.xfail((os.name == 'nt'), reason='Multiprocessing is currently unsupported on Windows')(True), False])
def test_fortran_invalid_exp(parallel):
 if (parallel and TRAVIS):
  pytest.xfail('Multiprocessing can sometimes fail on Travis CI')
 fields = ['1.0001+1', '.42d1', '2.3+10', '0.5', '3+1001', '3000.', '2', '4.56e-2.3', '8000', '4.2-122']
 values = ['1.0001+1', 4.2, '2.3+10', 0.5, '3+1001', 3000.0, 2, '4.56e-2.3', 8000, 4.2e-122]
 t = ascii.read(StringIO(' '.join(fields)), format='no_header', guess=False, fast_reader={'parallel': parallel, 'exponent_style': 'A'})
 read_values = [col[0] for col in t.itercols()]
 assert (read_values == values)

@ pytest . mark . parametrize ( 'parallel' , [ pytest . mark . xfail ( ( os . name == 'nt' ) , reason = 'Multiprocessing is currently unsupported on Windows' ) ( True ) , False ] ) def test_fortran_invalid_exp ( parallel ) : if ( parallel and TRAVIS ) : pytest . xfail ( 'Multiprocessing can sometimes fail on Travis CI' ) fields = [ '1.0001+1' , '.42d1' , '2.3+10' , '0.5' , '3+1001' , '3000.' , '2' , '4.56e-2.3' , '8000' , '4.2-122' ] values = [ '1.0001+1' , 4.2 , '2.3+10' , 0.5 , '3+1001' , 3000.0 , 2 , '4.56e-2.3' , 8000 , 4.2e-122 ] t = ascii . read ( StringIO ( ' ' . join ( fields ) ) , format = 'no_header' , guess = False , fast_reader = { 'parallel' : parallel , 'exponent_style' : 'A' } ) read_values = [ col [ 0 ] for col in t . itercols ( ) ] assert ( read_values == values )
test fortran-style exponential notation in the fast_reader with invalid exponent-like patterns to make sure they are returned as strings instead .