[Bioperl-guts-l] [16890] bioperl-live/trunk/t/RemoteDB/EUtilities.t: skip tests unless a valid email is provided (now an NCBI requirement)
Christopher John Fields
cjfields at dev.open-bio.org
Wed Mar 3 23:32:45 EST 2010
Revision: 16890
Author: cjfields
Date: 2010-03-03 23:32:45 -0500 (Wed, 03 Mar 2010)
Log Message:
-----------
skip tests unless a valid email is provided (now an NCBI requirement)
Modified Paths:
--------------
bioperl-live/trunk/t/RemoteDB/EUtilities.t
Modified: bioperl-live/trunk/t/RemoteDB/EUtilities.t
===================================================================
--- bioperl-live/trunk/t/RemoteDB/EUtilities.t 2010-03-04 04:27:09 UTC (rev 16889)
+++ bioperl-live/trunk/t/RemoteDB/EUtilities.t 2010-03-04 04:32:45 UTC (rev 16890)
@@ -41,7 +41,7 @@
test_begin(-tests => $NUMTESTS,
-requires_modules => [qw(XML::Simple LWP::UserAgent)],
- -requires_networking => 1,
+ -requires_email => 1,
);
use_ok('Bio::DB::EUtilities');
@@ -50,6 +50,10 @@
use_ok('Bio::Tools::EUtilities::EUtilParameters');
}
+my $email = test_email();
+
+diag("Using $email for tests") if $DEBUG;
+
# NOTE : Bio::DB::EUtilities is just a specialized pipeline to get any
# data available via NCBI's Entrez interface, with a few convenience methods
# to get UIDs and other additional information. All data returned
@@ -89,7 +93,8 @@
$eutil = Bio::DB::EUtilities->new(
-db => 'protein',
-id => [$ids[0]],
- -rettype => 'fasta'
+ -rettype => 'fasta',
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
@@ -119,6 +124,7 @@
-eutil => 'epost',
-db => 'protein',
-id => \@ids,
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
@@ -234,6 +240,7 @@
-eutil => 'esummary',
-db => 'protein',
-id => \@ids,
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
@@ -277,7 +284,8 @@
-eutil => 'esearch',
-db => 'protein',
-term => $term,
- -retmax => 100
+ -retmax => 100,
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
@@ -297,7 +305,8 @@
-db => 'protein',
-usehistory => 'y',
-term => $term,
- -retmax => 100
+ -retmax => 100,
+ -email => $email
);
eval {$response = $eutil->get_Response; };
@@ -339,6 +348,7 @@
$eutil = Bio::DB::EUtilities->new(
-eutil => 'einfo',
-db => 'protein',
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
eval {$response = $eutil->get_Response; };
@@ -358,6 +368,7 @@
# all databases (list)
$eutil = Bio::DB::EUtilities->new(
-eutil => 'einfo',
+ -email => $email
);
eval {$response = $eutil->get_Response; };
@@ -384,6 +395,7 @@
-db => 'taxonomy',
-dbfrom => 'protein',
-id => \@ids,
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
@@ -415,6 +427,7 @@
$eutil = Bio::DB::EUtilities->new(
-eutil => 'egquery',
-term => $term,
+ -email => $email
);
isa_ok($eutil, 'Bio::DB::GenericWebAgent');
More information about the Bioperl-guts-l
mailing list