comparison env/lib/python3.9/site-packages/bioblend/_tests/TestGalaxyJobs.py @ 0:4f3585e2f14b draft default tip

"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author shellac
date Mon, 22 Mar 2021 18:12:50 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4f3585e2f14b
1 from . import (
2 GalaxyTestBase,
3 test_util
4 )
5
6
7 class TestGalaxyJobs(GalaxyTestBase.GalaxyTestBase):
8 @test_util.skip_unless_galaxy('release_21.01')
9 @test_util.skip_unless_tool("random_lines1")
10 def test_run_and_rerun_random_lines(self):
11 history_id = self.gi.histories.create_history(name="test_run_random_lines history")["id"]
12 dataset_id = self._test_dataset(history_id, contents="line 1\nline 2\rline 3\r\nline 4")
13 tool_inputs = {
14 'num_lines': '1',
15 'input': {
16 'src': 'hda',
17 'id': dataset_id
18 },
19 'seed_source': {
20 'seed_source_selector': 'set_seed',
21 'seed': 'asdf'
22 }
23 }
24
25 original_output = self.gi.tools.run_tool(
26 history_id=history_id,
27 tool_id="random_lines1",
28 tool_inputs=tool_inputs,
29 input_format='21.01'
30 )
31 original_job_id = original_output['jobs'][0]['id']
32 build_for_rerun = self.gi.jobs._build_for_rerun(original_job_id)
33 self.assertEqual(build_for_rerun['state_inputs']['seed_source']['seed'], 'asdf')
34
35 rerun_output = self.gi.jobs.rerun_job(original_job_id)
36 rerun_output_content = self.gi.datasets.download_dataset(rerun_output['outputs'][0]['id'])
37 original_output_content = self.gi.datasets.download_dataset(original_output['outputs'][0]['id'])
38 self.assertEqual(rerun_output_content, original_output_content)