Implement drop table if exists (#383)

This commit is contained in:
Chang She
2023-07-31 10:25:09 +02:00
committed by GitHub
parent bcd7f66dc7
commit 2d25c263e9
2 changed files with 14 additions and 4 deletions

View File

@@ -149,6 +149,10 @@ def test_delete_table(tmp_path):
db.create_table("test", data=data)
assert db.table_names() == ["test"]
# dropping a table that does not exist should pass
# if ignore_missing=True
db.drop_table("does_not_exist", ignore_missing=True)
def test_empty_or_nonexistent_table(tmp_path):
db = lancedb.connect(tmp_path)