You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've stumbled upon the following issue recently.
In the case of a function test giving a warning through log.warn the warning doesn't seems to be produced through the nf-test if --verbose is not set.
Here is a reproducible example:
The function:
def checkMetaChr(chr_a, chr_b, name){
def intersect = chr_a
.combine(chr_b)
.map{
a, b ->if (b != [[]] &&!(a - b).isEmpty()) {
def chr_names = (a - b).size() > params.max_chr_names ? (a - b)[0..params.max_chr_names -1] + ['...'] : (a - b)
def verb = (a - b).size() ==1?"is":"are"
log.warn "Chr : ${chr_names}${verb} missing from ${name}"return (a-b)
}
return []
}
.flatten()
return intersect
}
The nf-test file
nextflow_workflow {
name "Test function"
script "../main.nf"
test ("Test checkMetaChr warning") {
function "checkMetaChr"
when {
function {
""" input[0] = Channel.of([["chr1", "chrY" ]]) input[1] = Channel.of([["chr1"]]) input[2] = "test""""
}
}
then {
assertAll (
{ assert function.success },
{ assert function.stdout.contains("WARN: Chr : [chrY] is missing from test") }
)
}
}
}
The two commands:
nf-test test main.nf --verbose # works
nf-test test main.nf # doesn't works
The text was updated successfully, but these errors were encountered:
Hi,
I've stumbled upon the following issue recently.
In the case of a function test giving a warning through
log.warn
the warning doesn't seems to be produced through the nf-test if--verbose
is not set.Here is a reproducible example:
The function:
The nf-test file
The two commands:
The text was updated successfully, but these errors were encountered: