Skip to content

Commit 6a4f249

Browse files
smeyerrertyler
authored andcommitted
Add test for attemping to create DeltaTable with invalid path
Signed-off-by: Sam Meyer-Reed <smeyerreed@gmail.com>
1 parent 8c2ecc5 commit 6a4f249

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

python/tests/test_create.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,3 +156,13 @@ def test_create_or_replace_existing_table(tmp_path: pathlib.Path, sample_table:
156156
)
157157

158158
assert dt.files() == []
159+
160+
161+
def test_delta_table_invalid_path_raises_error(tmp_path: pathlib.Path):
162+
nonexistent_path = tmp_path / "does_not_exist"
163+
assert not nonexistent_path.exists()
164+
165+
with pytest.raises(DeltaError):
166+
DeltaTable(str(nonexistent_path))
167+
168+
assert not nonexistent_path.exists()

0 commit comments

Comments
 (0)