Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
199
Issues
199
List
Board
Labels
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
haskell-gargantext
Commits
64b1aef7
Verified
Commit
64b1aef7
authored
Oct 09, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[test] fix test for ngrams (remove empty list test as it doesn't make much sense)
parent
8b4b79fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
Operations.hs
test/Test/Database/Operations.hs
+0
-2
NgramsByContext.hs
test/Test/Database/Operations/NgramsByContext.hs
+0
-21
No files found.
test/Test/Database/Operations.hs
View file @
64b1aef7
...
...
@@ -64,8 +64,6 @@ tests = sequential $ around withTestDB $ beforeWith (\ctx -> setupEnvironment ct
describe
"NgramsByContext Operations"
$
beforeWith
NBC
.
setupNgramsCorpus
$
do
it
"returns correct occurrences for ngrams"
$
NBC
.
testGetOccByNgramsOnlyFast
it
"handles empty results gracefully"
$
NBC
.
testGetOccByNgramsOnlyFastEmptyList
it
"returns valid context IDs"
$
NBC
.
testGetOccByNgramsOnlyFastValidContextIds
beforeWith
(
\
env
->
createAliceAndBob
env
>>=
(
const
$
pure
env
))
$
...
...
test/Test/Database/Operations/NgramsByContext.hs
View file @
64b1aef7
...
...
@@ -164,27 +164,6 @@ testGetOccByNgramsOnlyFast env = runTestMonad env $ do
Just
contexts
->
do
contexts
`
shouldSatisfy
`
(
not
.
null
)
-- Test that empty list returns empty results
testGetOccByNgramsOnlyFastEmptyList
::
TestEnv
->
Assertion
testGetOccByNgramsOnlyFastEmptyList
env
=
runTestMonad
env
$
do
result
<-
runDBQuery
$
do
parentId
<-
getRootId
testUsername
corpus
<-
getCorporaWithParentIdOrFail
parentId
let
corpusId
=
_node_id
corpus
lists
<-
getListsWithParentId
corpusId
case
lists
of
[]
->
nodeErrorWith
"No list found for corpus"
(
listNode
:
_
)
->
do
let
listId
=
_node_id
listNode
-- Query with empty corpus should return empty or very limited results
getOccByNgramsOnlyFast
corpusId
listId
NgramsTerms
liftIO
$
do
-- Should return a HashMap (possibly empty if no node_stories exist)
result
`
shouldSatisfy
`
HM
.
null
-- Test that results contain valid context IDs
testGetOccByNgramsOnlyFastValidContextIds
::
TestEnv
->
Assertion
testGetOccByNgramsOnlyFastValidContextIds
env
=
runTestMonad
env
$
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment