[Bioperl-guts-l] bioperl-live/t/lib BioperlTest.pm,1.8,1.9

Senduran Balasubramaniam sendu at dev.open-bio.org
Tue Jun 26 09:50:14 EDT 2007


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

Modified Files:
	BioperlTest.pm 
Log Message:
allow the skipping of all tests due to deprecation

Index: BioperlTest.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/t/lib/BioperlTest.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** BioperlTest.pm	22 Jun 2007 15:55:50 -0000	1.8
--- BioperlTest.pm	26 Jun 2007 13:50:12 -0000	1.9
***************
*** 164,167 ****
--- 164,171 ----
             -framework           => str (default 'Test::More', the Test module
                                          to load. NB: experimental, avoid using)
+            
+            Note, supplying -tests => 0 is possible, allowing you to skip all
+            tests in the case that a test script is testing deprecated modules
+            that have yet to be removed from the distribution
  
  =cut
***************
*** 178,181 ****
--- 182,188 ----
              eval "plan skip_all => '$skip_all';";
          }
+         elsif ($tests == 0) {
+             eval "plan skip_all => 'All tests are being skipped, probably because the module(s) being tested here are now deprecated';";
+         }
          else {
              eval "plan tests => $tests;";
***************
*** 222,225 ****
--- 229,233 ----
  sub test_skip {
      my ($skip, $tests, $framework) = _skip(@_);
+     $tests || die "-tests must be a number greater than 0";
      
      if ($framework eq 'Test::More') {
***************
*** 307,311 ****
      my %args = @_;
      
!     my $tests = $args{'-tests'} || die "-tests must be supplied and positive\n";
      delete $args{'-tests'};
      
--- 315,320 ----
      my %args = @_;
      
!     my $tests = $args{'-tests'};
!     (defined $tests && $tests =~ /^\d+$/) || die "-tests must be supplied and be an int\n";
      delete $args{'-tests'};
      



More information about the Bioperl-guts-l mailing list