# Path: pyani/pyani_jobs.py
# class Job(object):
# class JobGroup(object):
#     def __init__(self, name: str, command: str, queue: Optional[str] = None) -> None:
#     def add_dependency(self, job) -> None:
#     def remove_dependency(self, job) -> None:
#     def wait(self, interval: float = SGE_WAIT) -> None:
#     def __init__(
#         self,
#         name: str,
#         command: str,
#         queue: Optional[str] = None,
#         arguments: Optional[Dict[str, List[Any]]] = None,
#     ) -> None:
#     def generate_script(self) -> None:
#     def add_dependency(self, job) -> None:
#     def remove_dependency(self, job) -> None:
#     def wait(self, interval: float = SGE_WAIT) -> None:


from typing import Dict, NamedTuple
from pyani import pyani_jobs
import pytest
    job1.add_dependency(job2)
    dep = job1.dependencies[0]
    job1.remove_dependency(dep)

    assert 0 == len(job1.dependencies)


def test_create_jobgroup(job_empty_script):
    """create dummy jobgroup."""
    jobgroup = pyani_jobs.JobGroup("empty", "")
    assert jobgroup.script == job_empty_script


def test_1d_jobgroup(job_scripts):
    """create dummy 1-parameter sweep jobgroup."""
    jobgroup = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=job_scripts[0].params)
    assert (jobgroup.script, 3) == (job_scripts[0].script, jobgroup.tasks)


def test_2d_jobgroup(job_scripts):
    """create dummy 2-parameter sweep jobgroup."""
    jobgroup = pyani_jobs.JobGroup(
        "2d-sweep", "myprog", arguments=job_scripts[1].params
    )
    assert (jobgroup.script, 4) == (job_scripts[1].script, jobgroup.tasks)


def test_add_group_dependency(job_scripts):
    """add jobgroup dependency."""
    jg1 = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=job_scripts[0].params)

# Path: pyani/pyani_jobs.py
# class Job(object):
# class JobGroup(object):
#     def __init__(self, name: str, command: str, queue: Optional[str] = None) -> None:
#     def add_dependency(self, job) -> None:
#     def remove_dependency(self, job) -> None:
#     def wait(self, interval: float = SGE_WAIT) -> None:
#     def __init__(
#         self,
#         name: str,
#         command: str,
#         queue: Optional[str] = None,
#         arguments: Optional[Dict[str, List[Any]]] = None,
#     ) -> None:
#     def generate_script(self) -> None:
#     def add_dependency(self, job) -> None:
#     def remove_dependency(self, job) -> None:
#     def wait(self, interval: float = SGE_WAIT) -> None:


# Path: tests/test_jobs.py
from typing import Dict, NamedTuple
from pyani import pyani_jobs
import pytest

    job1.add_dependency(job2)
    dep = job1.dependencies[0]
    job1.remove_dependency(dep)

    assert 0 == len(job1.dependencies)


def test_create_jobgroup(job_empty_script):
    """create dummy jobgroup."""
    jobgroup = pyani_jobs.JobGroup("empty", "")
    assert jobgroup.script == job_empty_script


def test_1d_jobgroup(job_scripts):
    """create dummy 1-parameter sweep jobgroup."""
    jobgroup = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=job_scripts[0].params)
    assert (jobgroup.script, 3) == (job_scripts[0].script, jobgroup.tasks)


def test_2d_jobgroup(job_scripts):
    """create dummy 2-parameter sweep jobgroup."""
    jobgroup = pyani_jobs.JobGroup(
        "2d-sweep", "myprog", arguments=job_scripts[1].params
    )
    assert (jobgroup.script, 4) == (job_scripts[1].script, jobgroup.tasks)


def test_add_group_dependency(job_scripts):
    """add jobgroup dependency."""
    jg1 = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=job_scripts[0].params)

    jg2 = pyani_jobs.JobGroup("2d-sweep", "myprog", arguments=job_scripts[1].params)