~ubuntu-branches/ubuntu/oneiric/bioperl/oneiric

« back to all changes in this revision

Viewing changes to t/Biblio/eutils.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (3.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090310071911-ever3si2bbzx1iks
Tags: 1.6.0-2
* Removed patch system (not used):
  - removed instuctions in debian/rules;
  - removed quilt from Build-Depends in debian/control.
* Re-enabled tests:
  - uncommented test command in debian/rules;
  - uncommented previously missing build-dependencies in debian/control.
  - Re-enabled tests and uncommented build-dependencies accordingly.
* Removed libmodule-build-perl and libtest-harness-perl from
  Build-Depends-Indep (provided by perl-modules).
* Better cleaning of empty directories using find -type d -empty -delete
  instead of rmdir in debian/rules (LP: #324001).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*-Perl-*- Test Harness script for Bioperl
 
2
# $Id: eutils.t 15416 2009-01-21 16:46:12Z cjfields $
 
3
 
 
4
use strict;
 
5
 
 
6
BEGIN { 
 
7
    use lib '.';
 
8
        use Bio::Root::Test;
 
9
        
 
10
        test_begin(-tests => 4,
 
11
                           -requires_modules => [qw(IO::String LWP::Simple XML::Twig)],
 
12
                           -requires_networking => 1);
 
13
        
 
14
        use_ok('Bio::Biblio');
 
15
}
 
16
 
 
17
## End of black magic.
 
18
 
 
19
my $db;
 
20
 
 
21
my $verbose = test_debug();
 
22
SKIP: {
 
23
        ok ($db = Bio::Biblio->new(-access => 'eutils',
 
24
                                           -verbose=>$verbose));
 
25
        eval { 
 
26
                ok(defined($db->find('"Day A"[AU] AND ("Database Management Systems"[MH] OR "Databases, Genetic"[MH] OR "Software"[MH] OR "Software Design"[MH])')));
 
27
        };
 
28
        
 
29
        if ($@) {
 
30
                skip("Warning: Couldn't connect to Eutils server!\n$@\n",1);
 
31
        }
 
32
        
 
33
        # these aren't exactly the most stringent of tests...
 
34
        my $ct = 0;
 
35
        while(my $xml = $db->get_next) {
 
36
                $ct++
 
37
        }
 
38
        # bullet-proof this, though it really needs more stringent tests...
 
39
        cmp_ok($ct, '>=', 4)
 
40
}