Skip to content

Commit

Permalink
change tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonHafner committed Nov 1, 2024
1 parent 2d6ed7d commit 4d83b41
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 49 deletions.
13 changes: 12 additions & 1 deletion modules/nf-core/doubletdetection/tests/main.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,20 @@ nextflow_process {
}

then {
def mb = 1024 * 1024
def kb = 1024
assertAll(
{ assert process.success },
{ assert snapshot(process.out).match() }

// Only check if output exists, as phenotype supports no random seeding:
// https://github.com/jacoblevine/PhenoGraph/issues/16
{ assert path(process.out.h5ad.get(0).get(1)).exists() },
{ assert path(process.out.predictions.get(0).get(1)).exists() },

{ assert path(process.out.h5ad.get(0).get(1)).size() > 30 * mb },
{ assert path(process.out.predictions.get(0).get(1)).size() > 50 * kb },

{ assert snapshot(process.out.versions).match("versions") }
)
}

Expand Down
59 changes: 11 additions & 48 deletions modules/nf-core/doubletdetection/tests/main.nf.test.snap
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
{
"scdownsteam - h5ad": {
"scdownstream - h5ad - stub": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.h5ad:md5,8e452039b4db3f3791db690f508ec853"
"test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "test"
},
"test.pkl:md5,0e26d6b4f67f671efa4549e87f220b01"
"test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
Expand All @@ -26,15 +26,15 @@
{
"id": "test"
},
"test.h5ad:md5,8e452039b4db3f3791db690f508ec853"
"test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"predictions": [
[
{
"id": "test"
},
"test.pkl:md5,0e26d6b4f67f671efa4549e87f220b01"
"test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
Expand All @@ -46,55 +46,18 @@
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-31T20:20:20.035887346"
"timestamp": "2024-11-01T09:38:38.099329542"
},
"scdownstream - h5ad - stub": {
"versions": {
"content": [
{
"0": [
[
{
"id": "test"
},
"test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"1": [
[
{
"id": "test"
},
"test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"2": [
"versions.yml:md5,ac32922a834ca05946e47cb11e028705"
],
"h5ad": [
[
{
"id": "test"
},
"test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"predictions": [
[
{
"id": "test"
},
"test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e"
]
],
"versions": [
"versions.yml:md5,ac32922a834ca05946e47cb11e028705"
]
}
[
"versions.yml:md5,b339d31cdc0422b203a26440591e1f12"
]
],
"meta": {
"nf-test": "0.8.4",
"nextflow": "24.04.4"
},
"timestamp": "2024-10-31T20:20:41.897330916"
"timestamp": "2024-11-01T09:38:20.985491914"
}
}

0 comments on commit 4d83b41

Please sign in to comment.