diff --git a/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py b/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py index d1390392..7c2abfa4 100644 --- a/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py +++ b/modules/custom/dumpsoftwareversions/templates/dumpsoftwareversions.py @@ -58,11 +58,12 @@ versions_by_module = {} for process, process_versions in versions_by_process.items(): module = process.split(":")[-1] try: - assert versions_by_module[module] == process_versions, ( - "We assume that software versions are the same between all modules. " - "If you see this error-message it means you discovered an edge-case " - "and should open an issue in nf-core/tools. " - ) + if versions_by_module[module] != process_versions: + raise AssertionError( + "We assume that software versions are the same between all modules. " + "If you see this error-message it means you discovered an edge-case " + "and should open an issue in nf-core/tools. " + ) except KeyError: versions_by_module[module] = process_versions diff --git a/tests/modules/custom/dumpsoftwareversions/main.nf b/tests/modules/custom/dumpsoftwareversions/main.nf index b1761656..a9e532d2 100644 --- a/tests/modules/custom/dumpsoftwareversions/main.nf +++ b/tests/modules/custom/dumpsoftwareversions/main.nf @@ -42,7 +42,7 @@ workflow test_custom_dumpsoftwareversions { // cases where subworkflows have a module with the same name. fastqc1 ( input ) fastqc2 ( input ) - MULTIQC ( fastqc2.out.zip.collect { it[1] }, [[],[]] ) + MULTIQC ( fastqc2.out.zip.collect { it[1] }, [], [], [] ) fastqc1 .out