Skip to content

Commit

Permalink
[1033] Throw exception if the database path directory is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
anuchak committed Jan 4, 2023
1 parent 131002e commit c567c35
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tools/python_api/test/test_exception.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import pytest
import sys
sys.path.append('../build/')
import kuzu


def test_exception(establish_connection):
Expand All @@ -13,3 +16,9 @@ def test_exception(establish_connection):
with pytest.raises(RuntimeError,
match="Buffer manager exception: Resizing to a smaller Buffer Pool Size is unsupported."):
db.resize_buffer_manager(1)


def test_db_path_exception():
path = '/:* /? " < > |'
with pytest.raises(RuntimeError, match='filesystem error'):
kuzu.Database(str(path))

0 comments on commit c567c35

Please sign in to comment.