def test_lastdb_task_existing(tmpdir, datadir): with tmpdir.as_cwd(): tf = datadir('test-protein.fa') for ext in LASTDB_EXTENSIONS: touch(tf + ext) task = lastdb_task(tf, tf, prot=True) run_tasks([task], ['run']) print(task, file=sys.stderr) status = check_status(task) assert status.status == 'up-to-date'
def test_lastdb_task_prot(tmpdir, datadir): with tmpdir.as_cwd(): tf = datadir('test-protein.fa') task = lastdb_task(tf, tf, prot=True) run_tasks([task], ['run']) status = check_status(task) for ext in LASTDB_EXTENSIONS: assert os.path.isfile(tf + ext) assert status.status == 'up-to-date'
def test_lastdb_task_nucl(tmpdir, datadir): with tmpdir.as_cwd(): tf = datadir('test-transcript.fa') task = lastdb_task(tf, tf, prot=False) run_tasks([task], ['run']) status = check_status(task) print('PATH:', os.environ['PATH'], file=sys.stderr) for ext in LASTDB_EXTENSIONS: assert os.path.isfile(tf + ext) assert status.status == 'up-to-date'
def test_lastal_task_uptodate(tmpdir, datadir): with tmpdir.as_cwd(): prot = datadir('test-protein.fa') out = tmpdir.join('test-out').strpath db_task = lastdb_task(prot, prot) aln_task = lastal_task(prot, prot, out, translate=False, cutoff=None) # Run it once run_tasks([db_task, aln_task], ['run']) # Now run again and check the status #run_tasks(aln_tasks, ['run']) print(aln_task) status = check_status(aln_task, tasks=[aln_task, db_task]) assert status.status == 'up-to-date'