def test_load_from_unregistered(dummy_dataframe, tmpdir): catalog = DataCatalogWithDefault(data_sets={}, default=default_csv) path = str(tmpdir.mkdir("sub").join("test.csv")) catalog.save(path, dummy_dataframe) reloaded_df = catalog.load(path) assert dummy_dataframe.equals(reloaded_df)
def test_save_and_load_catalog(data_set, dummy_dataframe, tmpdir): catalog = DataCatalogWithDefault(data_sets={"test": data_set}, default=default_csv) path = str(tmpdir.mkdir("sub").join("test")) catalog.save(path, dummy_dataframe) reloaded_df = catalog.load(path) assert dummy_dataframe.equals(reloaded_df)
def test_remember_save(tmpdir, dummy_dataframe): catalog = DataCatalogWithDefault(data_sets={}, default=default_csv, remember=True) path = str(tmpdir.mkdir("sub").join("test.csv")) catalog.save(path, dummy_dataframe) assert tmpdir.join("sub").join("test.csv") in catalog.list()