From a6d2a32f3d1726419df6c236dc130fca7cc63a93 Mon Sep 17 00:00:00 2001 From: "Francisco J. Ossandon" Date: Fri, 19 Dec 2014 01:40:54 -0300 Subject: [PATCH] Inactivated tests for GOR4.t, HNN.t and Sopma.t, since their server (*.ibcp.fr) is now defunct (not responding and verified that it does not appear in name server records anymore) --- t/Tools/Analysis/Protein/GOR4.t | 7 +-- t/Tools/Analysis/Protein/HNN.t | 91 +++++++++++++++++----------------- t/Tools/Analysis/Protein/Sopma.t | 102 ++++++++++++++++++++------------------- 3 files changed, 102 insertions(+), 98 deletions(-) rewrite t/Tools/Analysis/Protein/HNN.t (75%) rewrite t/Tools/Analysis/Protein/Sopma.t (73%) diff --git a/t/Tools/Analysis/Protein/GOR4.t b/t/Tools/Analysis/Protein/GOR4.t index a79e5991c..2fa1e5b03 100644 --- a/t/Tools/Analysis/Protein/GOR4.t +++ b/t/Tools/Analysis/Protein/GOR4.t @@ -7,8 +7,9 @@ BEGIN { use lib '.'; use Bio::Root::Test; - test_begin(-tests => 13, - -requires_modules => [qw(IO::String LWP::UserAgent)], + test_begin(-tests => 0, + -requires_modules => [qw(IO::String + LWP::UserAgent)], -requires_networking => 1); use_ok("Bio::Seq"); @@ -22,7 +23,7 @@ ok my $tool = Bio::Tools::Analysis::Protein::GOR4->new(-seq=>$seq->primary_seq); SKIP: { ok $tool->run(); skip "Skipping tests since we got terminated by a server error", 9 if $tool->status eq 'TERMINATED_BY_ERROR'; - ok my $raw = $tool->result(''); + ok my $raw = $tool->result(''); ok my $parsed = $tool->result('parsed'); is $parsed->[0]{'coil'}, '56'; diff --git a/t/Tools/Analysis/Protein/HNN.t b/t/Tools/Analysis/Protein/HNN.t dissimilarity index 75% index 108faf022..03c4ed428 100644 --- a/t/Tools/Analysis/Protein/HNN.t +++ b/t/Tools/Analysis/Protein/HNN.t @@ -1,45 +1,46 @@ -# -*-Perl-*- Test Harness script for Bioperl -# $Id$ - -use strict; - -BEGIN { - use lib '.'; - use Bio::Root::Test; - - test_begin(-tests => 14, - -requires_modules => [qw(IO::String LWP::UserAgent)], - -requires_networking => 1); - - use_ok("Bio::Seq"); - use_ok("Bio::Tools::Analysis::Protein::HNN"); -} - -my $seq = Bio::Seq->new(-seq => 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS', - -display_id => 'test2'); -ok my $tool = Bio::Tools::Analysis::Protein::HNN->new(-seq=>$seq->primary_seq); - -SKIP: { - ok $tool->run(); - skip "Skipping tests since we got terminated by a server error", 9 if $tool->status eq 'TERMINATED_BY_ERROR'; - ok my $raw = $tool->result(''); - ok my $parsed = $tool->result('parsed'); - is $parsed->[0]{'coil'}, '1000'; - my @res = $tool->result('Bio::SeqFeatureI'); - if (scalar @res > 0) { - ok 1; - } - else { - skip 'No results - could not connect to HNN server?', 6; - } - - ok my $meta = $tool->result('meta'); - ok my $seqobj = Bio::Seq->new(-primary_seq => $meta, display_id=>"a"); - for ( $tool->result('Bio::SeqFeatureI') ) { - ok $seqobj->add_SeqFeature($_); - } - - test_skip(-tests => 2, -requires_module => 'Bio::Seq::Meta::Array'); - is $meta->named_submeta_text('HNN_helix',1,2), '0 111'; - is $meta->seq, 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS'; -} +# -*-Perl-*- Test Harness script for Bioperl +# $Id$ + +use strict; + +BEGIN { + use lib '.'; + use Bio::Root::Test; + + test_begin(-tests => 0, + -requires_modules => [qw(IO::String + LWP::UserAgent)], + -requires_networking => 1); + + use_ok("Bio::Seq"); + use_ok("Bio::Tools::Analysis::Protein::HNN"); +} + +my $seq = Bio::Seq->new(-seq => 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS', + -display_id => 'test2'); +ok my $tool = Bio::Tools::Analysis::Protein::HNN->new(-seq=>$seq->primary_seq); + +SKIP: { + ok $tool->run(); + skip "Skipping tests since we got terminated by a server error", 9 if $tool->status eq 'TERMINATED_BY_ERROR'; + ok my $raw = $tool->result(''); + ok my $parsed = $tool->result('parsed'); + is $parsed->[0]{'coil'}, '1000'; + my @res = $tool->result('Bio::SeqFeatureI'); + if (scalar @res > 0) { + ok 1; + } + else { + skip 'No results - could not connect to HNN server?', 6; + } + + ok my $meta = $tool->result('meta'); + ok my $seqobj = Bio::Seq->new(-primary_seq => $meta, display_id=>"a"); + for ( $tool->result('Bio::SeqFeatureI') ) { + ok $seqobj->add_SeqFeature($_); + } + + test_skip(-tests => 2, -requires_module => 'Bio::Seq::Meta::Array'); + is $meta->named_submeta_text('HNN_helix',1,2), '0 111'; + is $meta->seq, 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS'; +} diff --git a/t/Tools/Analysis/Protein/Sopma.t b/t/Tools/Analysis/Protein/Sopma.t dissimilarity index 73% index 5062e0c93..17c929ec2 100644 --- a/t/Tools/Analysis/Protein/Sopma.t +++ b/t/Tools/Analysis/Protein/Sopma.t @@ -1,50 +1,52 @@ -# -*-Perl-*- Test Harness script for Bioperl -# $Id$ - -use strict; - -BEGIN { - use lib '.'; - use Bio::Root::Test; - - test_begin(-tests => 16, - -requires_modules => [qw(IO::String LWP::UserAgent)]); - - use_ok('Bio::PrimarySeq'); - use_ok('Bio::Tools::Analysis::Protein::Sopma'); -} - -my $verbose = test_debug(); - -ok my $tool = Bio::WebAgent->new(-verbose =>$verbose); - -my $seq = Bio::PrimarySeq->new( - -seq => 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS', - -display_id => 'test2'); -ok $tool = Bio::Tools::Analysis::Protein::Sopma->new( -seq=>$seq, - #-verbose => $verbose, - -window_width => 15); - -SKIP: { - test_skip(-tests => 12, -requires_networking => 1); - - ok $tool->run(); - skip "Tool was terminated by some error: problem connecting to server?", 11 if $tool->status eq 'TERMINATED_BY_ERROR'; - - ok my $raw = $tool->result(''); - ok my $parsed = $tool->result('parsed'); - is ($parsed->[0]{'helix'}, '102'); - ok my @res = $tool->result('Bio::SeqFeatureI'); - ok my $meta = $tool->result('meta', "ww15"); - - ok $tool->window_width(21); - ok $tool->clear(); - ok $tool->run; - ok my $meta2 = $tool->result('meta', "ww21"); - - SKIP: { - test_skip(-tests => 2, -requires_module => 'Bio::Seq::Meta::Array'); - is $meta->named_submeta_text('Sopma_helix|ww15',1,2), '102 195'; - is $meta->seq, 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS'; - } -} +# -*-Perl-*- Test Harness script for Bioperl +# $Id$ + +use strict; + +BEGIN { + use lib '.'; + use Bio::Root::Test; + + test_begin(-tests => 0, + -requires_modules => [qw(IO::String + LWP::UserAgent)]); + + use_ok('Bio::PrimarySeq'); + use_ok('Bio::Tools::Analysis::Protein::Sopma'); +} + +my $verbose = test_debug(); + +ok my $tool = Bio::WebAgent->new(-verbose =>$verbose); + +my $seq = Bio::PrimarySeq->new( + -seq => 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS', + -display_id => 'test2' +); +ok $tool = Bio::Tools::Analysis::Protein::Sopma->new( -seq=>$seq, + #-verbose => $verbose, + -window_width => 15); + +SKIP: { + test_skip(-tests => 12, -requires_networking => 1); + + ok $tool->run(); + skip "Tool was terminated by some error: problem connecting to server?", 11 if $tool->status eq 'TERMINATED_BY_ERROR'; + + ok my $raw = $tool->result(''); + ok my $parsed = $tool->result('parsed'); + is ($parsed->[0]{'helix'}, '102'); + ok my @res = $tool->result('Bio::SeqFeatureI'); + ok my $meta = $tool->result('meta', "ww15"); + + ok $tool->window_width(21); + ok $tool->clear(); + ok $tool->run; + ok my $meta2 = $tool->result('meta', "ww21"); + + SKIP: { + test_skip(-tests => 2, -requires_module => 'Bio::Seq::Meta::Array'); + is $meta->named_submeta_text('Sopma_helix|ww15',1,2), '102 195'; + is $meta->seq, 'MSADQRWRQDSQDSFGDSFDGDPPPPPPPPFGDSFGDGFSDRSRQDQRS'; + } +} -- 2.11.4.GIT