refactor - tests

This commit is contained in:
Jaremy Creechley 2023-09-27 19:49:59 -07:00
parent dcb70ca429
commit 0f0e113f4f
No known key found for this signature in database
GPG Key ID: 4E66FB67B21D3300
2 changed files with 7 additions and 4 deletions

View File

@ -190,6 +190,7 @@ proc query*[K,V](
let key = query.key
without path =? self.findPath(key), error:
return failure error
echo "query:key: ", key
let basePath =
# it there is a file in the directory
@ -211,10 +212,10 @@ proc close*[K,V](handle: var DbQueryHandle[K,V,FsQueryEnv[K,V]]) =
iterator iter*[K, V](handle: var DbQueryHandle[K, V, FsQueryEnv[K,V]]
): ?!DbQueryResponse[K, V] =
let root = $(handle.env.self.root)
# echo "FS:root: ", root
echo "FS:root: ", root
for path in root.dirIter():
# echo "FS:path: ", path
echo "FS:path: ", path
if handle.cancel:
# echo "FS:CANCELLED!"
break

View File

@ -161,9 +161,11 @@ template queryTests*(
handle = ds.query(q).tryGet
let
res = handle.iter().toSeq().mapIt(block:
echo "RES: ", it.repr
echo "\nRES: ", it.repr
# quit(1)
it.tryGet()
)
)
# ).filterIt(it.isOk).mapIt(it.tryGet())
check:
res.len == 2