Skip to content

Commit

Permalink
Added nf-test for krona/ktupdatetaxonomy
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp committed Sep 6, 2024
1 parent 054b938 commit 701eb9e
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 24 deletions.
14 changes: 14 additions & 0 deletions modules/nf-core/krona/ktupdatetaxonomy/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ process KRONA_KTUPDATETAXONOMY {
'https://depot.galaxyproject.org/singularity/krona:2.7.1--pl526_5' :
'biocontainers/krona:2.7.1--pl526_5' }"

input:

output:
path 'taxonomy/taxonomy.tab', emit: db
path "versions.yml" , emit: versions
Expand All @@ -27,4 +29,16 @@ process KRONA_KTUPDATETAXONOMY {
krona: $VERSION
END_VERSIONS
"""

stub:
"""
mkdir taxonomy
touch taxonomy/taxonomy.tab
cat <<-END_VERSIONS > versions.yml
"${task.process}":
krona: $VERSION
END_VERSIONS
"""
}
50 changes: 50 additions & 0 deletions modules/nf-core/krona/ktupdatetaxonomy/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@

nextflow_process {

name "Test Process KRONA_KTUPDATETAXONOMY"
script "../main.nf"
process "KRONA_KTUPDATETAXONOMY"

tag "modules"
tag "modules_nfcore"
tag "krona"
tag "krona/ktupdatetaxonomy"

test("test-krona-ktupdatetaxonomy") {

when {
process {
"""
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

test("test-krona-ktupdatetaxonomy-stub") {
options '-stub'

when {
process {
"""
"""
}
}

then {
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }
)
}
}

}
48 changes: 48 additions & 0 deletions modules/nf-core/krona/ktupdatetaxonomy/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
{
"test-krona-ktupdatetaxonomy": {
"content": [
{
"0": [
"taxonomy.tab:md5,6d8ea6b7ff721f735412a670805de501"
],
"1": [
"versions.yml:md5,a0e095fdd3ba80fcc62188c4c1f38ff7"
],
"db": [
"taxonomy.tab:md5,6d8ea6b7ff721f735412a670805de501"
],
"versions": [
"versions.yml:md5,a0e095fdd3ba80fcc62188c4c1f38ff7"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T20:28:34.176093"
},
"test-krona-ktupdatetaxonomy-stub": {
"content": [
{
"0": [
"taxonomy.tab:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"1": [
"versions.yml:md5,a0e095fdd3ba80fcc62188c4c1f38ff7"
],
"db": [
"taxonomy.tab:md5,d41d8cd98f00b204e9800998ecf8427e"
],
"versions": [
"versions.yml:md5,a0e095fdd3ba80fcc62188c4c1f38ff7"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-05T20:15:46.959212"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -392,9 +392,6 @@ krona/ktimporttaxonomy:
krona/ktimporttext:
- modules/nf-core/krona/ktimporttext/**
- tests/modules/nf-core/krona/ktimporttext/**
krona/ktupdatetaxonomy:
- modules/nf-core/krona/ktupdatetaxonomy/**
- tests/modules/nf-core/krona/ktupdatetaxonomy/**
leehom:
- modules/nf-core/leehom/**
- tests/modules/nf-core/leehom/**
Expand Down
9 changes: 0 additions & 9 deletions tests/modules/nf-core/krona/ktupdatetaxonomy/main.nf

This file was deleted.

5 changes: 0 additions & 5 deletions tests/modules/nf-core/krona/ktupdatetaxonomy/nextflow.config

This file was deleted.

7 changes: 0 additions & 7 deletions tests/modules/nf-core/krona/ktupdatetaxonomy/test.yml

This file was deleted.

0 comments on commit 701eb9e

Please sign in to comment.