From 19fbf98934e1070e06e61a1c670fc3e1168c3df9 Mon Sep 17 00:00:00 2001 From: Kevin Liu Date: Sun, 21 Jul 2024 14:10:59 -0700 Subject: [PATCH] add test --- tests/table/test_init.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/table/test_init.py b/tests/table/test_init.py index e5458677ff..a9517fb4d5 100644 --- a/tests/table/test_init.py +++ b/tests/table/test_init.py @@ -1206,3 +1206,10 @@ def test_update_metadata_log_overflow(table_v2: Table) -> None: table_v2.metadata_location, ) assert len(new_metadata.metadata_log) == 1 + + +def test_table_update_have_corresponding_dispatch() -> None: + from pyiceberg.table import TableUpdate, _apply_table_update + # every TableUpdate should have a corresponding `_apply_table_update` dispatch function + + assert len(_apply_table_update.registry) == len(TableUpdate.__origin__.__args__) # type: ignore