From 204026356259a55bbed710df06d45b2bba0acde0 Mon Sep 17 00:00:00 2001 From: Peter Van Dyken Date: Thu, 9 May 2024 12:43:08 -0400 Subject: [PATCH] Add test --- snakebids/tests/test_app.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/snakebids/tests/test_app.py b/snakebids/tests/test_app.py index 5e8f79c1..eb162b1f 100644 --- a/snakebids/tests/test_app.py +++ b/snakebids/tests/test_app.py @@ -40,7 +40,6 @@ def test_arguments_carried_forward(mocker: MockerFixture): from snakebids.app import sb_plugins from snakebids.bidsapp import run - mocker.stopall() mocker.patch.object(run, "_Runner") snakemake = mocker.spy(sb_plugins, "SnakemakeBidsApp") SnakeBidsApp( @@ -55,6 +54,24 @@ def test_arguments_carried_forward(mocker: MockerFixture): ) +def test_str_converted_to_path(mocker: MockerFixture): + from snakebids.app import sb_plugins + from snakebids.bidsapp import run + + mocker.patch.object(run, "_Runner") + snakemake = mocker.spy(sb_plugins, "SnakemakeBidsApp") + SnakeBidsApp( + "", + configfile_path="config", + snakefile_path="Snakefile", + ).run_snakemake() + snakemake.assert_called_once_with( + snakemake_dir=Path(), + configfile_path=Path("config"), + snakefile_path=Path("Snakefile"), + ) + + def test_plugins_carried_forward(mocker: MockerFixture): from snakebids.app import bidsapp from snakebids.bidsapp import run