tests/tasks/tasks/util/test_load_tasks.py
def fake_data(tmpdir):
    """Create some false data for testing.

    """
    data = np.zeros((5,), dtype={'names': ['Freq', 'Log'],
                                 'formats': ['f8', 'f8']})
    full_path = os.path.join(str(tmpdir), 'fake.dat')
    with open(full_path, 'wb') as f:

        f.write('# this is a comment \n'.encode('utf-8'))
        f.write(('\t'.join(data.dtype.names) + '\n').encode('utf-8'))

        np.savetxt(f, data, delimiter='\t')

    return data
Create some false data for testing.

    
Create some false data for testing.
Create some false data for testing .
def fake_data(tmpdir):
    data = np.zeros((5,), dtype={'names': ['Freq', 'Log'],
                                 'formats': ['f8', 'f8']})
    full_path = os.path.join(str(tmpdir), 'fake.dat')
    with open(full_path, 'wb') as f:
        f.write('# this is a comment \n'.encode('utf-8'))
        f.write(('\t'.join(data.dtype.names) + '\n').encode('utf-8'))
        np.savetxt(f, data, delimiter='\t')
    return data
def fake_data ( tmpdir ) : data = np . zeros ( ( 5 , ) , dtype = { 'names' : [ 'Freq' , 'Log' ] , 'formats' : [ 'f8' , 'f8' ] } ) full_path = os . path . join ( str ( tmpdir ) , 'fake.dat' ) with open ( full_path , 'wb' ) as f : f . write ( '# this is a comment \n' . encode ( 'utf-8' ) ) f . write ( ( '\t' . join ( data . dtype . names ) + '\n' ) . encode ( 'utf-8' ) ) np . savetxt ( f , data , delimiter = '\t' ) return data
Create some false data for testing.
Create some false data for testing .
"""Create some false data for testing.

    """
tmpdir