Beispiel #1
0
    def test_all_before_adding(self, fake_data_set, fake_transformer):
        catalog = DataCatalog()
        catalog.add_transformer(fake_transformer)
        catalog.add("test", fake_data_set)

        catalog.save("test", 42)
        assert catalog.load("test") == 44
        assert fake_data_set.log == [("save", 43), ("load", 43)]
        assert fake_transformer.log == [("save", 42), ("load", 43)]
Beispiel #2
0
 def after_catalog_created(self, catalog: DataCatalog) -> None:
     for t in self._transformers:
         catalog.add_transformer(t)
Beispiel #3
0
    def test_not_found_error(self, fake_transformer):
        catalog = DataCatalog()

        with pytest.raises(DataSetNotFoundError):
            catalog.add_transformer(fake_transformer, "test")
Beispiel #4
0
 def after_catalog_created(self, catalog: DataCatalog) -> None:
     catalog.add_transformer(ProfileTimeTransformer())
     catalog.add_transformer(ProfileMemoryTransformer(), "master_table")