Skip to content

Commit 3ab06e2

Browse files
committed
better error msg
1 parent 87b2ae0 commit 3ab06e2

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/table/test_init.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,8 +1260,10 @@ def test_table_module_refactoring_backward_compatibility() -> None:
12601260
raise pytest.fail("Importing moved modules should not raise an exception") from exc
12611261

12621262

1263-
def test_table_update_have_corresponding_dispatch() -> None:
1263+
def test_table_update_has_corresponding_dispatch() -> None:
12641264
from pyiceberg.table import TableUpdate, _apply_table_update
1265-
# asser that every TableUpdate has a corresponding `_apply_table_update` dispatch function
1266-
1267-
assert len(_apply_table_update.registry) == len(TableUpdate.__origin__.__args__) # type: ignore
1265+
# assert that every TableUpdate has a corresponding `_apply_table_update` dispatch function
1266+
table_update_class = set(TableUpdate.__origin__.__args__) # type: ignore
1267+
dispatch_function_class = set(_apply_table_update.registry.keys())
1268+
missing_dispatch_function = table_update_class - dispatch_function_class
1269+
assert len(missing_dispatch_function) == 0, f"Missing dispatch function for {missing_dispatch_function}"

0 commit comments

Comments
 (0)