From 4d83b4183ecea760f892b2451e0c592376eda6a2 Mon Sep 17 00:00:00 2001 From: Leon Hafner Date: Fri, 1 Nov 2024 09:41:05 +0100 Subject: [PATCH] change tests --- .../doubletdetection/tests/main.nf.test | 13 +++- .../doubletdetection/tests/main.nf.test.snap | 59 ++++--------------- 2 files changed, 23 insertions(+), 49 deletions(-) diff --git a/modules/nf-core/doubletdetection/tests/main.nf.test b/modules/nf-core/doubletdetection/tests/main.nf.test index 957ea3704f2..8afce5a7be0 100644 --- a/modules/nf-core/doubletdetection/tests/main.nf.test +++ b/modules/nf-core/doubletdetection/tests/main.nf.test @@ -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") } ) } diff --git a/modules/nf-core/doubletdetection/tests/main.nf.test.snap b/modules/nf-core/doubletdetection/tests/main.nf.test.snap index 091b5e13e53..c0922386e51 100644 --- a/modules/nf-core/doubletdetection/tests/main.nf.test.snap +++ b/modules/nf-core/doubletdetection/tests/main.nf.test.snap @@ -1,5 +1,5 @@ { - "scdownsteam - h5ad": { + "scdownstream - h5ad - stub": { "content": [ { "0": [ @@ -7,7 +7,7 @@ { "id": "test" }, - "test.h5ad:md5,8e452039b4db3f3791db690f508ec853" + "test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "1": [ @@ -15,7 +15,7 @@ { "id": "test" }, - "test.pkl:md5,0e26d6b4f67f671efa4549e87f220b01" + "test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "2": [ @@ -26,7 +26,7 @@ { "id": "test" }, - "test.h5ad:md5,8e452039b4db3f3791db690f508ec853" + "test.h5ad:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "predictions": [ @@ -34,7 +34,7 @@ { "id": "test" }, - "test.pkl:md5,0e26d6b4f67f671efa4549e87f220b01" + "test.pkl:md5,d41d8cd98f00b204e9800998ecf8427e" ] ], "versions": [ @@ -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" } } \ No newline at end of file