Mercurial > repos > shellac > guppy_basecaller
comparison env/lib/python3.7/site-packages/bioblend/_tests/GalaxyTestBase.py @ 2:6af9afd405e9 draft
"planemo upload commit 0a63dd5f4d38a1f6944587f52a8cd79874177fc1"
author | shellac |
---|---|
date | Thu, 14 May 2020 14:56:58 -0400 |
parents | 26e78fe6e8c4 |
children |
comparison
equal
deleted
inserted
replaced
1:75ca89e9b81c | 2:6af9afd405e9 |
---|---|
1 import os | |
2 | |
3 import bioblend | |
4 import bioblend.galaxy | |
5 from . import test_util | |
6 from .test_util import unittest | |
7 | |
8 bioblend.set_stream_logger('test', level='INFO') | |
9 | |
10 BIOBLEND_TEST_JOB_TIMEOUT = int(os.environ.get("BIOBLEND_TEST_JOB_TIMEOUT", "60")) | |
11 | |
12 | |
13 @test_util.skip_unless_galaxy() | |
14 class GalaxyTestBase(unittest.TestCase): | |
15 | |
16 def setUp(self): | |
17 galaxy_key = os.environ['BIOBLEND_GALAXY_API_KEY'] | |
18 galaxy_url = os.environ['BIOBLEND_GALAXY_URL'] | |
19 self.gi = bioblend.galaxy.GalaxyInstance(url=galaxy_url, key=galaxy_key) | |
20 | |
21 def _test_dataset(self, history_id, contents="1\t2\t3", **kwds): | |
22 tool_output = self.gi.tools.paste_content(contents, history_id, **kwds) | |
23 return tool_output["outputs"][0]["id"] | |
24 | |
25 def _wait_and_verify_dataset(self, dataset_id, expected_contents, timeout_seconds=BIOBLEND_TEST_JOB_TIMEOUT): | |
26 dataset_contents = self.gi.datasets.download_dataset(dataset_id, maxwait=timeout_seconds) | |
27 self.assertEqual(dataset_contents, expected_contents) |