Peter,

Thanks for the contribution, I've verified that it works, and it has been committed in 9395:388e86c30bad.

   --Dave B.

On 4/15/13 09:59:46.000, Peter Cock wrote:
On Mon, Apr 15, 2013 at 2:15 PM, Dave Bouvier <d...@bx.psu.edu> wrote:
Peter,

Thanks for reporting this issue, it looks like there might be a bug in
tool_list.py, which I will be looking into. In the meantime, you should
still be able to run functional tests for your tool by executing

sh run_functional_tests.sh -id <tool_id>

Where <tool_id> is the ID you have defined in the tool XML. The
functional_tests.py script uses Galaxy's internal tool XML parser to
generate the list of functional tests to run, so it should be able to find
your tool and its tests.

    --Dave B.

Thanks for the clue Dave - you're right it is a bug in tool_list.py
which uses its own quick and dirty XML parser. The bug was
that is was confused by the use of the magic words 'id', 'name'
or 'description' in the values.

The patch below works for me, but assumes that there will
not be a space between the key and the equals sign. The
script remains a fragile hack - for instance if a tool's XML file
split the <tool> tag over multiple lines, only the first line
is used. Using a real XML parser instead would be better.

The patch also addresses a potential overflow bug where it
tests n = len(keys) - 1 as a possible key, and would then
go out of bounds to get the value from list element n+1.

The patch also replaces the use of -1 from find, using "in" is
far clearer.

The patch does not fix the non-standard 3 space indentation
(PEP8 recommends 4 space indentation).

Could you test this and commit it?

Peter

P.S. Yes, you're right for tool identifiers the ID is easy to get from
the tool's XML file (that doesn't work for sections though).

___________________________________________________________
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:
 http://lists.bx.psu.edu/

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

Reply via email to