[Bioperl-guts-l] [15369] bioperl-live/branches/branch-1-6: Sync with main trunk

Christopher John Fields cjfields at dev.open-bio.org
Tue Jan 13 13:49:28 EST 2009


Revision: 15369
Author:   cjfields
Date:     2009-01-13 13:49:28 -0500 (Tue, 13 Jan 2009)

Log Message:
-----------
Sync with main trunk

Modified Paths:
--------------
    bioperl-live/branches/branch-1-6/Bio/Seq/SeqWithQuality.pm
    bioperl-live/branches/branch-1-6/t/RemoteDB/HIV/HIV.t

Modified: bioperl-live/branches/branch-1-6/Bio/Seq/SeqWithQuality.pm
===================================================================
--- bioperl-live/branches/branch-1-6/Bio/Seq/SeqWithQuality.pm	2009-01-13 18:44:27 UTC (rev 15368)
+++ bioperl-live/branches/branch-1-6/Bio/Seq/SeqWithQuality.pm	2009-01-13 18:49:28 UTC (rev 15369)
@@ -220,7 +220,7 @@
       my $qualobj = Bio::Seq::PrimaryQual->new( -qual             => $qual,
                                                 -accession_number => $acc,
                                                 -primary_id       => $pid,
-                                                -desc             => $desc
+                                                -desc             => $desc,
                                                 -display_id       => $id,
                                                 -trace_indices    => $trace_indices );
       $self->{qual_ref} = $qualobj;

Modified: bioperl-live/branches/branch-1-6/t/RemoteDB/HIV/HIV.t
===================================================================
--- bioperl-live/branches/branch-1-6/t/RemoteDB/HIV/HIV.t	2009-01-13 18:44:27 UTC (rev 15368)
+++ bioperl-live/branches/branch-1-6/t/RemoteDB/HIV/HIV.t	2009-01-13 18:49:28 UTC (rev 15369)
@@ -6,7 +6,7 @@
 BEGIN {
     use Bio::Root::Test;
     test_begin(
-        -tests => 29,
+        -tests => 30,
         -requires_modules => [qw( XML::Simple HTTP::Request::Common)],
 	);
     use_ok('Bio::DB::HIV');
@@ -50,43 +50,42 @@
 
 # network tests
 SKIP: {
-    test_skip(-tests => 12,
+    test_skip(-tests => 13,
           -requires_networking => 1);
     
     # WebDBSeqI compliance-
     # (this requires network access, since request is built after establishing
     # the LANL session...)
     my $req;
-    eval {$req = $tobj->get_request('mode'=>'single','uids'=>['17756'])};
+    lives_ok {$req = $tobj->get_request('mode'=>'single','uids'=>['17756'])} 'test connection';
     if ($@) {
-        diag("Error: $@");
-        skip("Network problems, skipping all tests: $@", 12)
+        skip("Network problems, skipping all tests", 12)
     }
     isa_ok($req, 'HTTP::Request', 'Object returned from get_request');
     # get_... functionality
-    eval {
-        ok($tobj->get_Seq_by_id('17756'), 'get HXB2 by LANL id');
-        ok($tobj->get_Seq_by_acc('K03455'), 'get HXB2 by GB accession');
-    };
+    lives_ok { $tobj->get_Seq_by_id('17756') } 'get HXB2 by LANL id';
     if ($@) {
-        diag("Error: $@");
-        skip("Network problems, skipping all tests: $@", 11)
+        skip("Network problems, skipping all tests", 10)
     }
+    lives_ok { $tobj->get_Seq_by_acc('K03455');} 'get HXB2 by GB accession';
+    if ($@) {
+        skip("Network problems, skipping all tests", 9)
+    }    
     my ($seqio, $hxb2);
-    eval {
-        ok($seqio = $tobj->get_Stream_by_id(['17756']), 'get HXB2 in a stream');
-        ok($seqio = $tobj->get_Stream_by_acc(['K03455']), 'get HXB2 in a stream by accession');
-    };
+    lives_ok { $seqio = $tobj->get_Stream_by_id(['17756']) } 'get HXB2 in a stream';
     if ($@) {
-        diag("Error: $@");
-        skip("Network problems, skipping all tests: $@", 9)
+        skip("Network problems, skipping all tests", 8)
+    }    
+    lives_ok { $seqio = $tobj->get_Stream_by_acc(['K03455']) } 'get HXB2 in a stream by accession';
+    if ($@) {
+        skip("Network problems, skipping all tests", 7)
     }
     $hxb2 =  $seqio->next_seq;
     is($hxb2->primary_id, 'K03455', 'checking returned stream');
     is($hxb2->alphabet,'dna', 'checking returned stream');
     ok(!($hxb2->seq !~ /atgc/i), 'checking returned sequence');
     #network exceptions
-    
+        
     # bad id exception
     throws_ok { $tobj->get_Seq_by_id('XXXXXX') } qr/no sequences found/i, 'bad id exception check';
     # session id exception




More information about the Bioperl-guts-l mailing list