def test_remove_dependency(self): """add and remove jobgroup dependency.""" jg1 = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=self.params1) jg2 = pyani_jobs.JobGroup("2d-sweep", "myprog", arguments=self.params2) jg2.add_dependency(jg1) self.assertEqual(1, len(jg2.dependencies)) dep = jg2.dependencies[0] self.assertEqual("1d-sweep", dep.name) jg2.remove_dependency(dep) self.assertEqual(0, len(jg2.dependencies))
def test_remove_dependency(self): """add and remove jobgroup dependency.""" jg1 = pyani_jobs.JobGroup('1d-sweep', 'cat', arguments=self.params1) jg2 = pyani_jobs.JobGroup('2d-sweep', 'myprog', arguments=self.params2) jg2.add_dependency(jg1) assert_equal(1, len(jg2.dependencies)) dep = jg2.dependencies[0] assert_equal('1d-sweep', dep.name) jg2.remove_dependency(dep) assert_equal(0, len(jg2.dependencies))
def test_add_dependency(self): """add jobgroup dependency.""" jg1 = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=self.params1) jg2 = pyani_jobs.JobGroup("2d-sweep", "myprog", arguments=self.params2) jg2.add_dependency(jg1) self.assertEqual(4, jg2.tasks) self.assertEqual(1, len(jg2.dependencies)) dep = jg2.dependencies[0] self.assertEqual(3, dep.tasks) self.assertEqual("1d-sweep", dep.name)
def test_add_dependency(self): """add jobgroup dependency.""" jg1 = pyani_jobs.JobGroup('1d-sweep', 'cat', arguments=self.params1) jg2 = pyani_jobs.JobGroup('2d-sweep', 'myprog', arguments=self.params2) jg2.add_dependency(jg1) assert_equal(4, jg2.tasks) assert_equal(1, len(jg2.dependencies)) dep = jg2.dependencies[0] assert_equal(3, dep.tasks) assert_equal('1d-sweep', dep.name)
def test_remove_group_dependency(job_scripts): """add and remove 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) jg2.add_dependency(jg1) dep = jg2.dependencies[0] jg2.remove_dependency(dep) assert 0 == len(jg2.dependencies)
def test_1d_jobgroup(self): """create dummy 1-parameter sweep jobgroup.""" jobgroup = pyani_jobs.JobGroup("1d-sweep", "cat", arguments=self.params1) self.assertEqual(jobgroup.script, self.p1script) self.assertEqual(3, jobgroup.tasks)
def test_2d_jobgroup(self): """create dummy 2-parameter sweep jobgroup.""" jobgroup = pyani_jobs.JobGroup('2d-sweep', 'myprog', arguments=self.params2) assert_equal(jobgroup.script, self.p2script) assert_equal(4, jobgroup.tasks)
def test_1d_jobgroup(self): """create dummy 1-parameter sweep jobgroup.""" jobgroup = pyani_jobs.JobGroup('1d-sweep', 'cat', arguments=self.params1) assert_equal(jobgroup.script, self.p1script) assert_equal(3, 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) jg2.add_dependency(jg1) dep = jg2.dependencies[0] assert (1, 3, 4, "1d-sweep") == ( len(jg2.dependencies), dep.tasks, jg2.tasks, dep.name, )
def test_2d_jobgroup(self): """create dummy 2-parameter sweep jobgroup.""" jobgroup = pyani_jobs.JobGroup("2d-sweep", "myprog", arguments=self.params2) print(jobgroup.script) print(self.p2script) self.assertEqual(jobgroup.script, self.p2script) self.assertEqual(4, 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_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_create_jobgroup(job_empty_script): """create dummy jobgroup.""" jobgroup = pyani_jobs.JobGroup("empty", "") assert jobgroup.script == job_empty_script
def test_create_jobgroup(self): """create dummy jobgroup.""" jobgroup = pyani_jobs.JobGroup("empty", "") self.assertEqual(jobgroup.script, self.emptyscript)
def test_create_jobgroup(self): """create dummy jobgroup.""" jobgroup = pyani_jobs.JobGroup('empty', '') assert_equal(jobgroup.script, self.emptyscript)