From db6e02a63506df861d6765bbc1c31085b64ee11e Mon Sep 17 00:00:00 2001 From: Alex Kanitz Date: Wed, 31 Jan 2024 21:11:59 +0100 Subject: [PATCH] fix --- tests/files/zarp/workflow/Snakefile | 21 ++++++++++++++++++++ tests/files/zarp/workflow/rules/htsinfer.smk | 9 ++++----- tests/test_cli.py | 2 +- 3 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 tests/files/zarp/workflow/Snakefile diff --git a/tests/files/zarp/workflow/Snakefile b/tests/files/zarp/workflow/Snakefile new file mode 100644 index 0000000..97d2fc7 --- /dev/null +++ b/tests/files/zarp/workflow/Snakefile @@ -0,0 +1,21 @@ +"""Dummy version of Snakefile for ZARP workflow.""" + + +localrules: + dummy, + all, + + +rule all: + input: + "zarp_dummy_output", + + +rule dummy: + input: + config["samples"], + output: + "zarp_dummy_output", + shell: + 'cat {input} > {output}' + diff --git a/tests/files/zarp/workflow/rules/htsinfer.smk b/tests/files/zarp/workflow/rules/htsinfer.smk index f2a4385..108a06c 100644 --- a/tests/files/zarp/workflow/rules/htsinfer.smk +++ b/tests/files/zarp/workflow/rules/htsinfer.smk @@ -1,7 +1,4 @@ -""" -Dummy version of Snakefile for downloading inferring RNA-Seq sample -metadata with HTSinfer. -""" +"""Dummy version of Snakefile for inferring sample metadata with HTSinfer.""" localrules: @@ -15,8 +12,10 @@ rule all: rule dummy: + input: + config["samples"], output: config["samples_out"], shell: - 'echo "sample\tfq1" > {output}' + 'cat {input} > {output}' diff --git a/tests/test_cli.py b/tests/test_cli.py index 778c142..9aed37d 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -59,7 +59,7 @@ def test_normal_mode_with_args(self, monkeypatch, tmpdir): ) with pytest.raises(SystemExit) as exc: main() - assert exc.value.code == 1 + assert exc.value.code == 0 def test_normal_mode_with_runtime_error(self, monkeypatch, tmpdir): """Call with runtime error being raised."""