mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-09 21:32:58 +00:00
Error implementations (#232)
Solves #216 by adding a check on table open for existence of the `.lance` file. Does not check for it for remote connections.
This commit is contained in:
@@ -123,6 +123,15 @@ def test_delete_table(tmp_path):
|
||||
assert db.table_names() == ["test"]
|
||||
|
||||
|
||||
def test_empty_or_nonexistent_table(tmp_path):
|
||||
db = lancedb.connect(tmp_path)
|
||||
with pytest.raises(Exception):
|
||||
db.create_table("test_with_no_data")
|
||||
|
||||
with pytest.raises(Exception):
|
||||
db.open_table("does_not_exist")
|
||||
|
||||
|
||||
def test_replace_index(tmp_path):
|
||||
db = lancedb.connect(uri=tmp_path)
|
||||
table = db.create_table(
|
||||
|
||||
Reference in New Issue
Block a user