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_load(): catalog = DataCatalogWithDefault(data_sets={}, default=default_memory, remember=True) assert catalog.load("any") == 5 assert "any" in catalog.list()