Skip to content

Commit f83ac21

Browse files
committed
fix tests
1 parent 378e8d6 commit f83ac21

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

tests/io/test_io.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,8 +279,12 @@ def test_import_file_io() -> None:
279279

280280

281281
def test_import_file_io_does_not_exist(caplog: Any) -> None:
282+
import logging
283+
284+
caplog.set_level(logging.DEBUG)
282285
assert _import_file_io("pyiceberg.does.not.exist.FileIO", {}) is None
283286
assert "Could not initialize FileIO: pyiceberg.does.not.exist.FileIO" in caplog.text
287+
assert "ModuleNotFoundError: No module named 'pyiceberg.does'" in caplog.text
284288

285289

286290
def test_load_file() -> None:

tests/table/test_locations.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,15 @@ def test_custom_location_provider_single_path() -> None:
6666

6767

6868
def test_custom_location_provider_not_found(caplog: Any) -> None:
69+
import logging
70+
71+
caplog.set_level(logging.DEBUG)
6972
with pytest.raises(ValueError, match=r"Could not initialize LocationProvider"):
7073
load_location_provider(
7174
table_location="table_location", table_properties={"write.py-location-provider.impl": "module.not_found"}
7275
)
7376
assert "Could not initialize LocationProvider: module.not_found" in caplog.text
77+
assert "ModuleNotFoundError: No module named 'module'" in caplog.text
7478

7579

7680
def test_object_storage_no_partition() -> None:

0 commit comments

Comments
 (0)