[Bioperl-guts-l] bioperl-live/t lasergene.t,1.1,1.2

Torsten Seemann tseemann at dev.open-bio.org
Fri Jun 9 00:26:22 EDT 2006


Update of /home/repository/bioperl/bioperl-live/t
In directory dev.open-bio.org:/tmp/cvs-serv15482/t

Modified Files:
	lasergene.t 
Log Message:
Repaired module and wrote tests for "Lasergene" sequence format.


Index: lasergene.t
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/t/lasergene.t,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** lasergene.t	8 Jun 2006 05:51:38 -0000	1.1
--- lasergene.t	9 Jun 2006 04:26:20 -0000	1.2
***************
*** 6,10 ****
  use vars qw($NUMTESTS);
  BEGIN {
! 	$NUMTESTS = 1;
  	# to handle systems with no installed Test module
  	# we include the t dir (where a copy of Test.pm is located)
--- 6,10 ----
  use vars qw($NUMTESTS);
  BEGIN {
! 	$NUMTESTS = 11;
  	# to handle systems with no installed Test module
  	# we include the t dir (where a copy of Test.pm is located)
***************
*** 22,27 ****
  
  my $verbose = $ENV{'BIOPERLDEBUG'};
- ok(1);
  
! # NO TESTS IMPLEMENTED - cannot find an example lasergene sequence file!
  
--- 22,67 ----
  
  my $verbose = $ENV{'BIOPERLDEBUG'};
  
! #
! # Positive tests
! #
! 
! my $io = Bio::SeqIO->new(
!   -format => 'lasergene',
!   -verbose => $verbose,
!   -file => Bio::Root::IO->catfile(qw(t data test.lasergene))
! );
! 
! ok($io);
! 
! my $seq;
! 
! ok($seq = $io->next_seq);
! ok($seq->length, 12*3);
! ok($seq->subseq(1,12) eq 'ATCGATCGATCG');
! 
! ok($seq = $io->next_seq);
! ok($seq->length, 200);
! 
! ok($seq = $io->next_seq);
! ok($seq->length, 70*5+12);
! 
! ok(not defined $io->next_seq);
! 
! #
! # Negative tests
! #
! 
! $io = Bio::SeqIO->new(
!   -format => 'lasergene',
!   -verbose => $verbose,
!   -file => Bio::Root::IO->catfile(qw(t data test.fasta)) # not lasergene!
! );
! 
! ok($io);
! 
! eval { 
!   $io->next_seq;
! };
! ok($@ =~ m/unexpected end of file/i);
  



More information about the Bioperl-guts-l mailing list