maint: remove Travis stuff which has been replaced with Github actions (#325)
[bioperl-live.git] / t / AlignIO / po.t
blobc75e3027fc93e300de40e54340fbf4ce5179bb13
1 # -*-Perl-*- Test Harness script for Bioperl
2 # $Id: po.t 14971 2008-10-28 16:08:52Z cjfields $
4 use strict;
6 BEGIN {
7     use Bio::Root::Test;
8     
9     test_begin(-tests => 11);
10         
11         use_ok('Bio::AlignIO::po');
14 my $DEBUG = test_debug();
16 my ($str,$aln,$strout,$status);
18 # POA
19 # just skip on perl 5.6.0 and earlier as it causes a crash on 
20 # default perl with OS X 10.2
21 # fink perl 5.6.0 does not seem to have the problem
22 # can't figure out what it is so just skip for now
23 SKIP: {
24         skip("skipping due to bug in perl 5.6.0 that comes with OS X 10.2", 10) unless ($^O ne 'darwin' || $] > 5.006);
25         
26         $str = Bio::AlignIO->new(
27                           -file   => test_input_file('testaln.po'),
28                           -format => 'po',
29                           );
30         isa_ok($str, 'Bio::AlignIO');
31         $aln = $str->next_aln();
32         isa_ok($aln,'Bio::Align::AlignI');
33         is $aln->num_sequences, 6;
34         
35         # output is? i.e. does conversion from clustalw to po give the same alignment?
36         $str = Bio::AlignIO->new(
37                   '-file'   => test_input_file('testaln.clustalw'),
38                   '-format' => 'clustalw');
39         isa_ok($str,'Bio::AlignIO');
40         $aln = $str->next_aln();
41         isa_ok($aln,'Bio::Align::AlignI');
42         $strout = Bio::AlignIO->new(
43                  '-file'   => ">" . test_output_file(),
44                  '-format' => 'po');
45         $status = $strout->write_aln($aln);
46         is $status, 1, "po output test";
47         
48         $str = Bio::AlignIO->new(
49                  '-file'   => test_input_file('testaln.po'),
50                  '-format' => 'po');
51         isa_ok($str,'Bio::AlignIO');
52         my $aln2 = $str->next_aln();
53         isa_ok($aln2,'Bio::Align::AlignI');
54         is $aln2->num_sequences, $aln->num_sequences;
55         is $aln2->length, $aln->length;