Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions bindings/python/tests/test_datafusion_table_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ def warehouse(tmp_path_factory: pytest.TempPathFactory) -> Path:


@pytest.fixture(scope="session")
def catalog(warehouse: Path) -> Catalog:
def catalog(warehouse: Path):
catalog = load_catalog(
"default",
**{
"uri": f"sqlite:///{warehouse}/pyiceberg_catalog.db",
"warehouse": f"file://{warehouse}",
},
)
return catalog
yield catalog
catalog.close()


@pytest.fixture(scope="session")
Expand Down
7 changes: 5 additions & 2 deletions bindings/python/tests/test_huggingface_and_cdc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
@pytest.fixture(scope="module")
def local_catalog(tmp_path_factory: pytest.TempPathFactory):
warehouse = tmp_path_factory.mktemp("cdc_warehouse")
return load_catalog(
catalog = load_catalog(
"default",
**{
"uri": f"sqlite:///{warehouse}/pyiceberg_catalog.db",
"warehouse": f"file://{warehouse}",
},
)
yield catalog
catalog.close()


@pytest.fixture(scope="module")
Expand Down Expand Up @@ -168,7 +170,8 @@ def hf_cdc_table(sample_table):
# HfFileSystem.dircache may reflect the pre-write state; invalidate it so
# subsequent reads (info/open) see the files just uploaded via xet.
tbl.io.get_fs("hf").invalidate_cache()
return tbl, token
yield tbl, token
catalog.close()


@requires_hf
Expand Down
Loading