diff --git a/pyiceberg/catalog/__init__.py b/pyiceberg/catalog/__init__.py index 0098d4997c..cb1325610d 100644 --- a/pyiceberg/catalog/__init__.py +++ b/pyiceberg/catalog/__init__.py @@ -646,7 +646,7 @@ def purge_table(self, identifier: Union[str, Identifier]) -> None: delete_files(io, prev_metadata_files, PREVIOUS_METADATA) delete_files(io, {table.metadata_location}, METADATA) - def table_exist(self, identifier: Union[str, Identifier]) -> bool: + def table_exists(self, identifier: Union[str, Identifier]) -> bool: try: self.load_table(identifier) return True diff --git a/tests/catalog/test_base.py b/tests/catalog/test_base.py index e439be0319..3218239dd9 100644 --- a/tests/catalog/test_base.py +++ b/tests/catalog/test_base.py @@ -377,15 +377,15 @@ def test_table_raises_error_on_table_not_found(catalog: InMemoryCatalog) -> None catalog.load_table(TEST_TABLE_IDENTIFIER) -def test_table_exist(catalog: InMemoryCatalog) -> None: +def test_table_exists(catalog: InMemoryCatalog) -> None: # Given given_catalog_has_a_table(catalog) # Then - assert catalog.table_exist(TEST_TABLE_IDENTIFIER) + assert catalog.table_exists(TEST_TABLE_IDENTIFIER) -def test_table_exist_on_table_not_found(catalog: InMemoryCatalog) -> None: - assert not catalog.table_exist(TEST_TABLE_IDENTIFIER) +def test_table_exists_on_table_not_found(catalog: InMemoryCatalog) -> None: + assert not catalog.table_exists(TEST_TABLE_IDENTIFIER) def test_drop_table(catalog: InMemoryCatalog) -> None: