1 # -*-Perl-*- Test Harness script for Bioperl
10 test_begin(-tests => 14,
11 -requires_modules => [qw(IO::String LWP::UserAgent)]);
13 use_ok('Bio::Tools::Analysis::Protein::Scansite');
15 use_ok('Bio::WebAgent');
18 my $verbose = test_debug();
20 ok my $tool = Bio::WebAgent->new(-verbose =>$verbose);
23 my $seqio=Bio::SeqIO->new( -verbose => $verbose,
25 -file => test_input_file('swiss.dat'));
27 my $seq = $seqio->next_seq();
28 ok $tool = Bio::Tools::Analysis::Protein::Scansite->new(
29 -seq=>$seq->primary_seq);
30 ok $tool->stringency('Low');
31 is $tool->stringency(), 'Low';
32 is $tool->protein_id(), $tool->seq->display_id();
35 test_skip(-tests => 6, -requires_networking => 2);
37 skip "Something wrong with server? Terminated by error, skipping tests", 5 if $tool->status eq 'TERMINATED_BY_ERROR';
38 ok my $raw = $tool->result('');
39 print $raw if $verbose;
40 ok my $parsed = $tool->result('parsed');
41 is $parsed->[0]{'site'}, 'T101';
42 ok my @res = $tool->result('Bio::SeqFeatureI');
43 is $res[0]->start, 101;