Skip to content

Commit

Permalink
adapt test to code changes
Browse files Browse the repository at this point in the history
  • Loading branch information
leoschwarz committed Sep 9, 2024
1 parent d8d8338 commit 0ae5952
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/unit/workflow/test_snakemake_invoke.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from __future__ import annotations

from pathlib import Path

import pytest
from pytest_mock import MockerFixture

Expand All @@ -16,7 +18,7 @@ def test_get_base_command(mocker: MockerFixture, default_invoke: SnakemakeInvoke
mocker.patch.object(SnakemakeInvoke, "snakefile_path", "/tmp/workflow/Snakefile")
base_command = default_invoke.get_base_command(
extra_args=["--keep-going"],
work_dir="/tmp/work",
work_dir=Path("/tmp/work"),
)
assert base_command == [
"/custom/bin/snakemake",
Expand All @@ -37,7 +39,7 @@ def test_get_base_command_when_snakemake_not_found(mocker: MockerFixture, defaul
with pytest.raises(RuntimeError) as excinfo:
default_invoke.get_base_command(
extra_args=[],
work_dir="/tmp/work",
work_dir=Path("/tmp/work"),
)
assert str(excinfo.value).startswith("snakemake not found, check PATH:")

Expand Down

0 comments on commit 0ae5952

Please sign in to comment.