# Path: pyani/anim.py
# class PyaniANImException(PyaniException):
# def get_fasta_files(dirname: Path = Path(".")) -> Iterable:
# def get_version(nucmer_exe: Path = pyani_config.NUCMER_DEFAULT) -> str:
# def generate_nucmer_jobs(
#     filenames: List[Path],
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
#     jobprefix: str = "ANINUCmer",
# ):
# def generate_nucmer_commands(
#     filenames: List[Path],
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
# ) -> Tuple[List, List]:
# def construct_nucmer_cmdline(
#     fname1: Path,
#     fname2: Path,
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
# ) -> Tuple[str, str]:
# def parse_delta(filename: Path) -> Tuple[int, int]:
# def process_deltadir(
#     delta_dir: Path, org_lengths: Dict, logger: Optional[Logger] = None
# ) -> ANIResults:
# 
# Path: pyani/pyani_files.py
# class PyaniFilesException(PyaniException):
# def get_fasta_files(dirname: Path = Path(".")) -> List[Path]:
# def get_fasta_paths(
#     dirname: Path = Path("."), extlist: Optional[List] = None
# ) -> List[Path]:
# def get_fasta_and_hash_paths(dirname: Path = Path(".")) -> List[Tuple[Path, Path]]:
# def get_input_files(dirname: Path, *ext) -> List[Path]:
# def get_sequence_lengths(fastafilenames: Iterable[Path]) -> Dict[str, int]:
# def read_hash_string(filename: Path) -> Tuple[str, str]:
# def read_fasta_description(filename: Path) -> str:
# def load_classes_labels(path: Path) -> Dict[str, str]:
# def collect_existing_output(dirpath: Path, program: str, args: Namespace) -> List[Path]:


from pathlib import Path
from typing import List, NamedTuple, Tuple
from pandas.testing import assert_frame_equal
from pyani import anim, pyani_files
import pandas as pd
import pytest
import unittest
    """
    cmds = anim.generate_nucmer_commands(mummer_cmds_four.infiles)
    print(f"\n{cmds}")
    print((mummer_cmds_four.ncmds, mummer_cmds_four.fcmds))
    assert cmds == (mummer_cmds_four.ncmds, mummer_cmds_four.fcmds)


def test_mummer_single(tmp_path, path_file_two):
    """Generate single NUCmer/delta-filter command-line."""
    cmds = anim.construct_nucmer_cmdline(
        path_file_two[0], path_file_two[1], outdir=tmp_path
    )
    dir_nucmer = tmp_path / "nucmer_output"
    outprefix = (
        dir_nucmer
        / str(path_file_two[0].stem)
        / str(path_file_two[0].stem + "_vs_" + path_file_two[1].stem)
    )
    expected = (
        f"nucmer --mum -p {outprefix} {path_file_two[0]} {path_file_two[1]}",
        f"delta_filter_wrapper.py delta-filter -1 {outprefix}.delta {outprefix}.filter",
    )
    assert cmds == expected


def test_mummer_job_generation(mummer_cmds_four):
    """Generate dependency tree of NUCmer/delta-filter jobs.

    Tests that the correct dependency graph and naming scheme is produced.
    """

# Path: pyani/anim.py
# class PyaniANImException(PyaniException):
# def get_fasta_files(dirname: Path = Path(".")) -> Iterable:
# def get_version(nucmer_exe: Path = pyani_config.NUCMER_DEFAULT) -> str:
# def generate_nucmer_jobs(
#     filenames: List[Path],
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
#     jobprefix: str = "ANINUCmer",
# ):
# def generate_nucmer_commands(
#     filenames: List[Path],
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
# ) -> Tuple[List, List]:
# def construct_nucmer_cmdline(
#     fname1: Path,
#     fname2: Path,
#     outdir: Path = Path("."),
#     nucmer_exe: Path = pyani_config.NUCMER_DEFAULT,
#     filter_exe: Path = pyani_config.FILTER_DEFAULT,
#     maxmatch: bool = False,
# ) -> Tuple[str, str]:
# def parse_delta(filename: Path) -> Tuple[int, int]:
# def process_deltadir(
#     delta_dir: Path, org_lengths: Dict, logger: Optional[Logger] = None
# ) -> ANIResults:
# 
# Path: pyani/pyani_files.py
# class PyaniFilesException(PyaniException):
# def get_fasta_files(dirname: Path = Path(".")) -> List[Path]:
# def get_fasta_paths(
#     dirname: Path = Path("."), extlist: Optional[List] = None
# ) -> List[Path]:
# def get_fasta_and_hash_paths(dirname: Path = Path(".")) -> List[Tuple[Path, Path]]:
# def get_input_files(dirname: Path, *ext) -> List[Path]:
# def get_sequence_lengths(fastafilenames: Iterable[Path]) -> Dict[str, int]:
# def read_hash_string(filename: Path) -> Tuple[str, str]:
# def read_fasta_description(filename: Path) -> str:
# def load_classes_labels(path: Path) -> Dict[str, str]:
# def collect_existing_output(dirpath: Path, program: str, args: Namespace) -> List[Path]:


# Path: tests/test_anim.py
from pathlib import Path
from typing import List, NamedTuple, Tuple
from pandas.testing import assert_frame_equal
from pyani import anim, pyani_files
import pandas as pd
import pytest
import unittest

    """
    cmds = anim.generate_nucmer_commands(mummer_cmds_four.infiles)
    print(f"\n{cmds}")
    print((mummer_cmds_four.ncmds, mummer_cmds_four.fcmds))
    assert cmds == (mummer_cmds_four.ncmds, mummer_cmds_four.fcmds)


def test_mummer_single(tmp_path, path_file_two):
    """Generate single NUCmer/delta-filter command-line."""
    cmds = anim.construct_nucmer_cmdline(
        path_file_two[0], path_file_two[1], outdir=tmp_path
    )
    dir_nucmer = tmp_path / "nucmer_output"
    outprefix = (
        dir_nucmer
        / str(path_file_two[0].stem)
        / str(path_file_two[0].stem + "_vs_" + path_file_two[1].stem)
    )
    expected = (
        f"nucmer --mum -p {outprefix} {path_file_two[0]} {path_file_two[1]}",
        f"delta_filter_wrapper.py delta-filter -1 {outprefix}.delta {outprefix}.filter",
    )
    assert cmds == expected


def test_mummer_job_generation(mummer_cmds_four):
    """Generate dependency tree of NUCmer/delta-filter jobs.

    Tests that the correct dependency graph and naming scheme is produced.
    """

    joblist = anim.generate_nucmer_jobs(mummer_cmds_four.infiles, jobprefix="test")