Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/bioblend/_tests/TestGalaxyToolInputs.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 bioblend.galaxy.tools.inputs import ( | |
2 conditional, | |
3 dataset, | |
4 inputs, | |
5 repeat, | |
6 ) | |
7 | |
8 | |
9 def test_conditional(): | |
10 # Build up example inputs for random_lines1 | |
11 as_dict = inputs().set( | |
12 "num_lines", 5 | |
13 ).set( | |
14 "input", dataset("encoded1") | |
15 ).set( | |
16 "seed_source", conditional().set( | |
17 "seed_source_selector", "set_seed" | |
18 ).set( | |
19 "seed", "asdf" | |
20 ) | |
21 ).to_dict() | |
22 assert as_dict["num_lines"] == 5 | |
23 assert as_dict["input"]["src"] == "hda" | |
24 assert as_dict["input"]["id"] == "encoded1" | |
25 assert as_dict["seed_source|seed_source_selector"] == "set_seed" | |
26 assert as_dict["seed_source|seed"] == "asdf" | |
27 | |
28 | |
29 def test_repeat(): | |
30 # Build up inputs for cat1 | |
31 as_dict = inputs().set( | |
32 "input1", dataset("encoded1") | |
33 ).set( | |
34 "queries", repeat().instance( | |
35 inputs().set_dataset_param("input2", "encoded2") | |
36 ).instance( | |
37 inputs().set_dataset_param("input2", "encoded3") | |
38 ) | |
39 ).to_dict() | |
40 assert as_dict["input1"]["src"] == "hda" | |
41 assert as_dict["input1"]["id"] == "encoded1" | |
42 assert as_dict["queries_0|input2"]["src"] == "hda" | |
43 assert as_dict["queries_0|input2"]["id"] == "encoded2" | |
44 assert as_dict["queries_1|input2"]["src"] == "hda" | |
45 assert as_dict["queries_1|input2"]["id"] == "encoded3" |