Peter - thanks for the detailed bug report!

I believe this should be fixed with the following PR
(https://github.com/galaxyproject/galaxy/pull/273) that has been
merged into release_15.05 on github as well as the dev branch. I tried
to fixed a few different bugs related to boolean and select handling
with in the confines of tests - so let me know if it didn't fix this
exact use case and I will look at it some more.

There is now this test case that verifies the correctness of boolean
test parameters inside of conditionals
(https://github.com/galaxyproject/galaxy/blob/dev/test/functional/tools/boolean_conditional.xml)
- let me know if you see anything wrong with it. The test can be run
with by executing:

./run_tests.sh -framework -id boolean_conditional

from Galaxy's root.

Thanks again,
-John

On Tue, May 19, 2015 at 10:01 AM, Peter Briggs
<peter.bri...@manchester.ac.uk> wrote:
> Hello
>
> I've encountered a problem with my tool tests when using a boolean as the
> "control" parameter within a conditional: it doesn't appear to be possible
> to change the value from the default "true" or "false" values within the
> tests.
>
> For example if I have a boolean 'bdg2' which controls a conditional block
> and which defaults to its falsevalue:
>
>   ...
>   <conditional name="bdg_options">
>     <param name="bdg2" type="boolean" checked="False"
>            truevalue="-B2" falsevalue="" label="Save pileups in bedGraph?"
> />
>     <when value="-B2">
>   ...
>
> and then try to set the value within a test using:
>
>     <param name="bdg_options|bdg2" value="true" />
>
> then the value remains unchanged from the default when the tests are run.
> (Similarly if I set checked="True" then the value in the tests is always
> "True" regardless of the value I try to set.)
>
> I've tried various ways of referencing the parameter (e.g.
> 'bdg_options|bdg2', 'bdg2' and 'bdg_options') but none of these work for me.
>
> Am I doing something obviously wrong? (nb this is a different problem from
> my previous post about setting boolean values in tests - that works fine for
> booleans which are not conditional control parameters).
>
> I've made a small example tool to investigate the issue, the files are here:
>
> https://gist.github.com/pjbriggs/c27e4366dfcdd6d96cb2
>
> and using planemo 0.11.1 to run the tests.
>
> (On a side note, it also seems that within the <command> section, the values
> returned for this type of boolean only ever appear to be 'True' or 'False' -
> but it seems okay to match against the truevalue and falsevalues in the
> <when> tag.)
>
> Thanks for any help,
>
> Best wishes
>
> Peter
>
> --
> Peter Briggs peter.bri...@manchester.ac.uk
> Bioinformatics Core Facility University of Manchester
> B.1083 Michael Smith Bldg Tel: (0161) 2751482
> ___________________________________________________________
> Please keep all replies on the list by using "reply all"
> in your mail client.  To manage your subscriptions to this
> and other Galaxy lists, please use the interface at:
>  https://lists.galaxyproject.org/
>
> To search Galaxy mailing lists use the unified search at:
>  http://galaxyproject.org/search/mailinglists/
___________________________________________________________
Please keep all replies on the list by using "reply all"
in your mail client.  To manage your subscriptions to this
and other Galaxy lists, please use the interface at:
  https://lists.galaxyproject.org/

To search Galaxy mailing lists use the unified search at:
  http://galaxyproject.org/search/mailinglists/

Reply via email to