Skip to content

Commit

Permalink
Added test with high threshold
Browse files Browse the repository at this point in the history
    writes empty output file
  • Loading branch information
AmstlerStephan committed Dec 15, 2023
1 parent 0d5b012 commit 55572eb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
26 changes: 26 additions & 0 deletions tests/modules/local/filter_results.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,30 @@ nextflow_process {
}

}

test("Should output an empty file") {

when {
params {
annotation_min_log10p = 100
}
process {
"""
input[0] = Channel.of( ['Y1', "$baseDir/tests/input/filter_results/regenie_step2_example_Y1.regenie.gz"], ['Y2', "$baseDir/tests/input/filter_results/regenie_step2_example_Y2.regenie.gz"])
"""
}
}

then {
assert process.success
assert snapshot(process.out).match()
with(process.out){
with(results_filtered){
def lines = path(get(0).get(1)).readLinesGzip()
assert (lines.size() == 0)
}
}
}

}
}
27 changes: 27 additions & 0 deletions tests/modules/local/filter_results.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,32 @@
}
],
"timestamp": "2023-12-15T10:16:52.606586"
},
"Should output an empty file": {
"content": [
{
"0": [
[
"Y1",
"Y1.regenie.filtered.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"Y2",
"Y2.regenie.filtered.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"results_filtered": [
[
"Y1",
"Y1.regenie.filtered.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
],
[
"Y2",
"Y2.regenie.filtered.gz:md5,d41d8cd98f00b204e9800998ecf8427e"
]
]
}
],
"timestamp": "2023-12-15T10:37:15.316506"
}
}

0 comments on commit 55572eb

Please sign in to comment.