# Path: pyani/blast.py
# def parse_blasttab(fhandle: TextIO) -> List[List[str]]:
# 
# Path: pyani/nucmer.py
# class DeltaData:
# class DeltaHeader:
# class DeltaAlignment:
# class DeltaMetadata:
# class DeltaComparison:
# class DeltaIterator:
#     def __init__(self, name: str, handle: TextIO = None) -> None:
#     def from_delta(self, handle: TextIO) -> None:
#     def comparisons(self):
#     def metadata(self):
#     def reference(self):
#     def program(self):
#     def query(self):
#     def __eq__(self, other):
#     def __len__(self):
#     def __str__(self):
#     def __init__(
#         self, reference: Path, query: Path, reflen: int, querylen: int
#     ) -> None:
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(
#         self,
#         refstart: int,
#         refend: int,
#         qrystart: int,
#         qryend: int,
#         errs: int,
#         simerrs: int,
#         stops: int,
#     ) -> None:
#     def __lt__(self, other):
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(self) -> None:
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(self, header: DeltaHeader, alignments: List[DeltaAlignment]) -> None:
#     def add_alignment(self, aln: DeltaAlignment) -> None:
#     def __eq__(self, other):
#     def __len__(self):
#     def __str__(self):
#     def __init__(self, handle: TextIO) -> None:
#     def __iter__(self):
#     def __next__(self):


import copy
import json
import unittest
import pandas as pd
from pyani import blast, nucmer

    def assertNucmerEqual(self, fname1, fname2):  # pylint: disable=C0103
        """Assert that two passed nucmer output files are equal.

        :param fname1:  path to reference .delta/.filter file
        :param fname2:  path to comparator .delta/.filter file

        This is a standard file comparison, skipping the first line.
        """
        with open(fname1, "r") as fh1:
            with open(fname2, "r") as fh2:
                fdata1 = nucmer.DeltaData("fh1", fh1)
                fdata2 = nucmer.DeltaData("fh2", fh2)
                self.assertEqual(
                    fdata1,
                    fdata2,
                    msg="Nucmer files {} and {} are not equivalent".format(
                        fname1, fname2
                    ),
                )

    def assertBlasttabEqual(self, fname1, fname2):  # pylint: disable=C0103
        """Assert that two passed BLAST+ .tab output files contain the same data.

        This is not a simple comparison, as we can't rely on the same ordering,
        so we parse the files and compare objects.
        """
        with open(fname1, "r") as fh1:
            with open(fname2, "r") as fh2:
                data1 = blast.parse_blasttab(fh1)

# Path: pyani/blast.py
# def parse_blasttab(fhandle: TextIO) -> List[List[str]]:
# 
# Path: pyani/nucmer.py
# class DeltaData:
# class DeltaHeader:
# class DeltaAlignment:
# class DeltaMetadata:
# class DeltaComparison:
# class DeltaIterator:
#     def __init__(self, name: str, handle: TextIO = None) -> None:
#     def from_delta(self, handle: TextIO) -> None:
#     def comparisons(self):
#     def metadata(self):
#     def reference(self):
#     def program(self):
#     def query(self):
#     def __eq__(self, other):
#     def __len__(self):
#     def __str__(self):
#     def __init__(
#         self, reference: Path, query: Path, reflen: int, querylen: int
#     ) -> None:
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(
#         self,
#         refstart: int,
#         refend: int,
#         qrystart: int,
#         qryend: int,
#         errs: int,
#         simerrs: int,
#         stops: int,
#     ) -> None:
#     def __lt__(self, other):
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(self) -> None:
#     def __eq__(self, other):
#     def __str__(self):
#     def __init__(self, header: DeltaHeader, alignments: List[DeltaAlignment]) -> None:
#     def add_alignment(self, aln: DeltaAlignment) -> None:
#     def __eq__(self, other):
#     def __len__(self):
#     def __str__(self):
#     def __init__(self, handle: TextIO) -> None:
#     def __iter__(self):
#     def __next__(self):


# Path: tests/tools.py
import copy
import json
import unittest
import pandas as pd
from pyani import blast, nucmer


    def assertNucmerEqual(self, fname1, fname2):  # pylint: disable=C0103
        """Assert that two passed nucmer output files are equal.

        :param fname1:  path to reference .delta/.filter file
        :param fname2:  path to comparator .delta/.filter file

        This is a standard file comparison, skipping the first line.
        """
        with open(fname1, "r") as fh1:
            with open(fname2, "r") as fh2:
                fdata1 = nucmer.DeltaData("fh1", fh1)
                fdata2 = nucmer.DeltaData("fh2", fh2)
                self.assertEqual(
                    fdata1,
                    fdata2,
                    msg="Nucmer files {} and {} are not equivalent".format(
                        fname1, fname2
                    ),
                )

    def assertBlasttabEqual(self, fname1, fname2):  # pylint: disable=C0103
        """Assert that two passed BLAST+ .tab output files contain the same data.

        This is not a simple comparison, as we can't rely on the same ordering,
        so we parse the files and compare objects.
        """
        with open(fname1, "r") as fh1:
            with open(fname2, "r") as fh2:
                data1 = blast.parse_blasttab(fh1)

                data2 = blast.parse_blasttab(fh2)