Hello Peter C.

Thanks for the prompt response - yes, using 'true' and 'false' in the tests 
seems to work for my simple example (as do 'True' and 'False').

However I suspect that there is something else going on in the real tool that 
I'm trying to test, as I still can't get this to work - so I'm going to have to 
keep investigating. At least now I know that I'm setting the booleans properly 
in the tests (and will add that to my list of gotchas).

Thanks again for your help, best wishes


Peter Briggs peter.bri...@manchester.ac.uk
Bioinformatics Core Facility University of Manchester
B.1083 Michael Smith Bldg Tel: (0161) 2751482

From: Peter Cock [p.j.a.c...@googlemail.com]
Sent: Friday, May 08, 2015 3:16 PM
To: Peter Briggs
Cc: galaxy-dev@lists.galaxyproject.org
Subject: Re: [galaxy-dev] 'Boolean' parameter type misbehaves in tool tests if 
truevalue starts with hyphen?

On Fri, May 8, 2015 at 3:05 PM, Peter Briggs
<peter.bri...@manchester.ac.uk> wrote:
> Hello
> I'm currently writing tests for a tool and think I've found a situation where 
> the behaviour of the boolean parameter type does not seem correct within the 
> test environment.
> The tool defines the following boolean parameter:
>  <param name="spmr" type="boolean" truevalue="--SPMR" falsevalue="" 
> checked="False"  ... />
> and accesses its value in the <command> tag using:
>  -B $spmr
> i.e. if the boolean is true then this should output "-B --SPMR", if not then 
> it should output "-B  ".
> This appears to work as expected when the tool is installed and used 
> interactively. But when running the tests the 'falsevalue' is always 
> returned, even if the value is set to the 'truevalue' in the tests i.e.:
> <param name="spmr" value="--SPMR" />
> and
> <param name="spmr" value="" />
> both return "-B  ".

I think you may need to set the value to true/false here, e.g.


(It would be clearer if the test framework insisted on this, but it
may be allowing the truevalue or falsevalue to be used - at least when
they don't start with a minus sign?)

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:

To search Galaxy mailing lists use the unified search at:

Reply via email to