mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-04 06:33:11 +00:00
refactor - tests
This commit is contained in:
parent
ae311856a8
commit
dcb70ca429
@ -102,7 +102,7 @@ proc readFile[V](self: FSDatastore, path: string): ?!V =
|
|||||||
file.close
|
file.close
|
||||||
|
|
||||||
if not file.open(path):
|
if not file.open(path):
|
||||||
return failure "unable to open file!"
|
return failure "unable to open file! path: " & path
|
||||||
|
|
||||||
try:
|
try:
|
||||||
let
|
let
|
||||||
|
|||||||
@ -160,7 +160,10 @@ template queryTests*(
|
|||||||
var
|
var
|
||||||
handle = ds.query(q).tryGet
|
handle = ds.query(q).tryGet
|
||||||
let
|
let
|
||||||
res = handle.iter().toSeq().mapIt(it.tryGet())
|
res = handle.iter().toSeq().mapIt(block:
|
||||||
|
echo "RES: ", it.repr
|
||||||
|
it.tryGet()
|
||||||
|
)
|
||||||
|
|
||||||
check:
|
check:
|
||||||
res.len == 2
|
res.len == 2
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user