From 823459b54627110b64567551c4e320f63ea91a17 Mon Sep 17 00:00:00 2001 From: cjfields Date: Mon, 5 Jan 2009 04:22:36 +0000 Subject: [PATCH] Sync with trunk svn path=/bioperl-live/branches/branch-1-6/; revision=15291 --- t/RemoteDB/HIV/HIV.t | 20 ++++++++++++++++---- t/RemoteDB/RefSeq.t | 2 +- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/t/RemoteDB/HIV/HIV.t b/t/RemoteDB/HIV/HIV.t index 24bc95d83..936d13d99 100755 --- a/t/RemoteDB/HIV/HIV.t +++ b/t/RemoteDB/HIV/HIV.t @@ -64,11 +64,23 @@ SKIP: { } isa_ok($req, 'HTTP::Request', 'Object returned from get_request'); # get_... functionality - ok($tobj->get_Seq_by_id('17756'), 'get HXB2 by LANL id'); - ok($tobj->get_Seq_by_acc('K03455'), 'get HXB2 by GB accession'); + 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'); + }; + if ($@) { + diag("Error: $@"); + skip("Network problems, skipping all tests: $@", 11) + } my ($seqio, $hxb2); - 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'); + 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'); + }; + if ($@) { + diag("Error: $@"); + skip("Network problems, skipping all tests: $@", 9) + } $hxb2 = $seqio->next_seq; is($hxb2->primary_id, 'K03455', 'checking returned stream'); is($hxb2->alphabet,'dna', 'checking returned stream'); diff --git a/t/RemoteDB/RefSeq.t b/t/RemoteDB/RefSeq.t index adfd11df3..369172356 100644 --- a/t/RemoteDB/RefSeq.t +++ b/t/RemoteDB/RefSeq.t @@ -45,7 +45,7 @@ SKIP: { ok $seq2 = $db2->get_Seq_by_acc('NM_006732'); is($seq2->length, 3776); }; - skip "Warning: Couldn't connect to RefSeq with Bio::DB::RefSeq.pm!", 4 if $@; + skip "Warning: Couldn't connect to RefSeq with Bio::DB::RefSeq.pm!", 10 if $@; eval { ok defined($db = Bio::DB::RefSeq->new(-verbose=>$verbose)); -- 2.11.4.GIT