Skip to content

Commit edf0c17

Browse files
committed
better error msg
1 parent 19fbf98 commit edf0c17

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/table/test_init.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,9 @@ def test_update_metadata_log_overflow(table_v2: Table) -> None:
12101210

12111211
def test_table_update_have_corresponding_dispatch() -> None:
12121212
from pyiceberg.table import TableUpdate, _apply_table_update
1213-
# every TableUpdate should have a corresponding `_apply_table_update` dispatch function
12141213

1215-
assert len(_apply_table_update.registry) == len(TableUpdate.__origin__.__args__) # type: ignore
1214+
# every TableUpdate class should have corresponding `_apply_table_update` dispatch function
1215+
table_update_class = set(TableUpdate.__origin__.__args__) # type: ignore
1216+
dispatch_function_class = set(_apply_table_update.registry.keys())
1217+
missing_dispatch_function = table_update_class - dispatch_function_class
1218+
assert len(missing_dispatch_function) == 0, f"Missing dispatch function for {missing_dispatch_function}"

0 commit comments

Comments
 (0)