Skip to content

Commit

Permalink
Added nf-test for goleft/indexsplit (#6595)
Browse files Browse the repository at this point in the history
  • Loading branch information
GallVp authored Sep 6, 2024
1 parent 51ba46d commit 8291e7e
Show file tree
Hide file tree
Showing 8 changed files with 141 additions and 40 deletions.
1 change: 0 additions & 1 deletion modules/nf-core/goleft/indexsplit/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ name: goleft_indexsplit
channels:
- conda-forge
- bioconda
- defaults
dependencies:
- bioconda::goleft=0.2.4
2 changes: 1 addition & 1 deletion modules/nf-core/goleft/indexsplit/meta.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ tools:
documentation: "https://github.com/brentp/goleft"
tool_dev_url: "https://github.com/brentp/goleft"
doi: "10.1093/gigascience/gix090"
licence: "['MIT']"
licence: ["MIT"]
input:
- meta:
type: map
Expand Down
68 changes: 68 additions & 0 deletions modules/nf-core/goleft/indexsplit/tests/main.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@

nextflow_process {

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

tag "modules"
tag "modules_nfcore"
tag "goleft"
tag "goleft/indexsplit"

test("test-goleft-indexsplit") {

when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = [
[ id:'sarscov2'], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
]
input[2] = 10
"""
}
}

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

test("test-goleft-indexsplit-stub") {
options '-stub'
when {
process {
"""
input[0] = [
[ id:'test', single_end:false ], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/illumina/bam/test.single_end.sorted.bam.bai', checkIfExists: true)
]
input[1] = [
[ id:'sarscov2'], // meta map
file(params.modules_testdata_base_path + 'genomics/sarscov2/genome/genome.fasta.fai', checkIfExists: true)
]
input[2] = 10
"""
}
}

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

}
72 changes: 72 additions & 0 deletions modules/nf-core/goleft/indexsplit/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"test-goleft-indexsplit": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,6158ae22773bda2b1380c1f7e324d7a9"
]
],
"1": [
"versions.yml:md5,f71bc54dc512c7e78b0cf5fe7d3f0b05"
],
"bed": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,6158ae22773bda2b1380c1f7e324d7a9"
]
],
"versions": [
"versions.yml:md5,f71bc54dc512c7e78b0cf5fe7d3f0b05"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T08:39:21.842028"
},
"test-goleft-indexsplit-stub": {
"content": [
{
"0": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
"versions.yml:md5,f71bc54dc512c7e78b0cf5fe7d3f0b05"
],
"bed": [
[
{
"id": "test",
"single_end": false
},
"test.bed:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,f71bc54dc512c7e78b0cf5fe7d3f0b05"
]
}
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "24.04.4"
},
"timestamp": "2024-09-06T08:39:26.342137"
}
}
3 changes: 0 additions & 3 deletions tests/config/pytest_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,6 @@ glimpse2/concordance:
glnexus:
- modules/nf-core/glnexus/**
- tests/modules/nf-core/glnexus/**
goleft/indexsplit:
- modules/nf-core/goleft/indexsplit/**
- tests/modules/nf-core/goleft/indexsplit/**
gprofiler2/gost:
- modules/nf-core/gprofiler2/gost/**
- tests/modules/nf-core/gprofiler2/gost/**
Expand Down
21 changes: 0 additions & 21 deletions tests/modules/nf-core/goleft/indexsplit/main.nf

This file was deleted.

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

This file was deleted.

9 changes: 0 additions & 9 deletions tests/modules/nf-core/goleft/indexsplit/test.yml

This file was deleted.

0 comments on commit 8291e7e

Please sign in to comment.