def sample_pattern_datasource_with_cache(data_filenames): metadata = { 'cache': [{ 'argkey': 'urlpath', 'regex': make_path_posix(os.path.dirname(__file__)), 'type': 'file' }] } return csv.CSVSource(data_filenames['sample_pattern'], metadata=metadata)
def test_open(data_filenames): d = csv.CSVSource(data_filenames['sample1']) assert d.container == 'dataframe' assert d.description is None verify_datasource_interface(d)
def sample_list_datasource_with_path_as_pattern_str(data_filenames): return csv.CSVSource( [data_filenames['sample2_1'], data_filenames['sample2_2']], path_as_pattern='sample{num:d}_{dup:d}.csv')
def sample_list_datasource(data_filenames): return csv.CSVSource( [data_filenames['sample2_1'], data_filenames['sample2_2']])
def sample_pattern_datasource(data_filenames): return csv.CSVSource(data_filenames['sample_pattern'])
def sample2_datasource(data_filenames): return csv.CSVSource(data_filenames['sample2_all'])