[Bioperl-l] feedback on small patch for bioperl-run's t/Neighbor.t

George Hartzell hartzell at kestrel.alerce.com
Thu Sep 29 18:10:37 EDT 2005


t/Neighbor.t fails for me, the patch below fixes it.

I'm running w/ -live and -run from CVS this morning, and Phylip3.6
(and the proper env. variable set).

I'm getting four nodes, one of which has an id that's ''.  By touching
up the test code so that the id field must be defined and non-empty,
things work, and the existence of that filter suggests that it's ok
for there to be more than the three expected nodes in the list.

Does this patch make sense, or am I missing something subtle?

g.

Index: t/Neighbor.t
===================================================================
RCS file: /home/repository/bioperl/bioperl-run/t/Neighbor.t,v
retrieving revision 1.7
diff -c -3 -r1.7 Neighbor.t
*** t/Neighbor.t	18 Dec 2002 13:43:45 -0000	1.7
--- t/Neighbor.t	29 Sep 2005 21:15:22 -0000
***************
*** 77,83 ****
  
  ($tree) = $tree_factory->create_tree($inputfilename);
  my @nodes = sort { $a->id cmp $b->id } 
!             grep { defined $_->id} $tree->get_nodes();
  
  ok($nodes[2]->id, 'SINFRUP002');
  ok($nodes[1]->id, 'SINFRUP001');
--- 77,83 ----
  
  ($tree) = $tree_factory->create_tree($inputfilename);
  my @nodes = sort { $a->id cmp $b->id } 
!             grep { defined $_->id and $_->id} $tree->get_nodes();
  
  ok($nodes[2]->id, 'SINFRUP002');
  ok($nodes[1]->id, 'SINFRUP001');


More information about the Bioperl-l mailing list