~ubuntu-branches/ubuntu/saucy/bioperl/saucy-proposed

« back to all changes in this revision

Viewing changes to t/ClusterIO/ClusterIO.t

  • Committer: Bazaar Package Importer
  • Author(s): Charles Plessy
  • Date: 2009-03-10 07:19:11 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20090310071911-fukqzw54pyb1f0bd
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: ClusterIO.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 => 12,
 
11
                           -requires_module => 'Time::HiRes');
 
12
    
 
13
        use_ok('Bio::ClusterIO');
 
14
        use_ok('Bio::Cluster::ClusterFactory');
 
15
}
 
16
 
 
17
SKIP: {
 
18
        test_skip(-tests => 8, -requires_module => 'XML::Parser::PerlSAX');
 
19
    
 
20
        my ($clusterio, $result,$hit,$hsp);
 
21
        $clusterio = Bio::ClusterIO->new('-tempfile' => 0,
 
22
                                        '-format' => 'dbsnp',
 
23
                                        '-file'   => test_input_file('LittleChrY.dbsnp.xml'));
 
24
    
 
25
        $result = $clusterio->next_cluster;
 
26
        ok($result);
 
27
        is($result->observed, 'C/T');
 
28
        is($result->type, 'notwithdrawn');
 
29
        ok($result->seq_5);
 
30
        ok($result->seq_3);
 
31
        my @ss = $result->each_subsnp;
 
32
        is scalar @ss,  5;
 
33
        is($ss[0]->handle, 'CGAP-GAI');
 
34
        is($ss[1]->handle, 'LEE');
 
35
        
 
36
        # don't know if these were ever meant to work... cjf 3/7/07
 
37
        #is($result->heterozygous, 0.208738461136818);
 
38
        #is($result->heterozygous_SE, 0.0260274689436777);
 
39
}
 
40
 
 
41
###################################
 
42
# ClusterFactory tests            #
 
43
###################################
 
44
 
 
45
my $fact = Bio::Cluster::ClusterFactory->new();
 
46
# auto-recognize implementation class
 
47
my $clu = $fact->create_object(-display_id => 'Hs.2');
 
48
isa_ok($clu, "Bio::Cluster::UniGeneI");
 
49
$clu = $fact->create_object(-namespace => "UNIGENE");
 
50
isa_ok($clu, "Bio::Cluster::UniGeneI");