Skip to content
Snippets Groups Projects
test_ntrfc_workflows.py 1007 B
Newer Older
Malte Nyhuis's avatar
Malte Nyhuis committed
#!/usr/bin/env python

"""Tests for `ntrfc` package."""

from pathlib import Path
import snakemake
from py._path.local import LocalPath as TmpDir


def test_snakefile(tmpdir: TmpDir) -> None:
    """
    this test is working, but its not suitable for long-term-development
    it copies (deploys) the workflow into TmpDir and it is executing a snakemake dry-run
    """
    # Create input files
    import os
    from ntrfc.utils.snake_utils.deployment import deploy
    deploy("case_creation", workdir)
        snakefile=str(os.path.join(tmpdir, "Snakefile")),
        # lint=True,
        # log_handler=[logger.log_handler],
        ignore_ambiguity=True,
    )

    # Check the results
    assert result, "Snakemake did not complete successfully"