1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 18,
11 -requires_modules => [qw(IO::String
13 HTTP::Request::Common)],
14 -requires_networking => 1);
16 use_ok('Bio::DB::GenBank');
17 use_ok('Bio::DB::GenPept');
18 use_ok('Bio::DB::SwissProt');
19 use_ok('Bio::DB::RefSeq');
20 use_ok('Bio::DB::EMBL');
21 use_ok('Bio::DB::BioFetch');
24 my $verbose = test_debug();
27 my ($id, $class) = @_;
28 print "###################### $class ####################################\n" if $verbose;
30 ok defined( my $gb = $class->new('-verbose' => $verbose,
32 '-retrievaltype' => 'tempfile') ), "defined for $class";
34 if ($class eq 'Bio::DB::SwissProt') {
35 test_skip(-tests => 1, -requires_module => 'Data::Stag');
39 eval { $seq = $gb->get_Seq_by_id($id) };
40 if ($@ || !defined $seq) {
41 ok 1, "error or undef for $class";
44 ok 0, "failure for $class";
47 my @classes = qw( Bio::DB::BioFetch Bio::DB::GenBank Bio::DB::GenPept
48 Bio::DB::SwissProt Bio::DB::RefSeq Bio::DB::EMBL );
50 my $id = 'XXX111'; # nonsense id