Start adding tests, using testament.
FossilOrigin-Name: 6f368f0d303c65000c74f346b7bc39ffca964aff7767c60be2384739e5dc4d72
This commit is contained in:
parent
89e879ca68
commit
1ed442a68a
16 changed files with 200 additions and 44 deletions
10
tests/connection/t_can_create_new_connection.nim
Normal file
10
tests/connection/t_can_create_new_connection.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
# vim: set et sta sw=4 ts=4 :
|
||||
|
||||
import kuzu
|
||||
|
||||
|
||||
let db = newKuzuDatabase()
|
||||
|
||||
assert db.path == "(in-memory)"
|
||||
assert typeOf( db.connect ) is KuzuConnection
|
||||
|
||||
13
tests/connection/t_can_interrupt_running_query.nim
Normal file
13
tests/connection/t_can_interrupt_running_query.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
# vim: set et sta sw=4 ts=4 :
|
||||
|
||||
import kuzu
|
||||
|
||||
|
||||
let db = newKuzuDatabase()
|
||||
let conn = db.connect
|
||||
|
||||
# FIXME: This test should really perform some
|
||||
# long running query in a thread, and cancel
|
||||
# it from elsewhere.
|
||||
conn.queryInterrupt()
|
||||
|
||||
12
tests/connection/t_can_set_connection_query_timeout.nim
Normal file
12
tests/connection/t_can_set_connection_query_timeout.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
# vim: set et sta sw=4 ts=4 :
|
||||
|
||||
import kuzu
|
||||
|
||||
let db = newKuzuDatabase()
|
||||
let conn = db.connect
|
||||
|
||||
# There is currently no getter for this, so
|
||||
# we'll just have to assume a lack of
|
||||
# exception/error means success.
|
||||
conn.queryTimeout( 1000 )
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue