[BioRuby-cvs] bioruby/test/unit/bio/util test_sirna.rb,1.1,1.2

Katayama Toshiaki k at pub.open-bio.org
Tue Dec 27 12:27:40 EST 2005


Update of /home/repository/bioruby/bioruby/test/unit/bio/util
In directory pub.open-bio.org:/tmp/cvs-serv830/test/unit/bio/util

Modified Files:
	test_sirna.rb 
Log Message:
* unit tests are fixed to run without errors with Ruby 1.8.4 (due to the
  change of rand algorithm in 1.8.3) as reported by N. Goto.


Index: test_sirna.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/util/test_sirna.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_sirna.rb	14 Nov 2005 14:46:06 -0000	1.1
--- test_sirna.rb	27 Dec 2005 17:27:38 -0000	1.2
***************
*** 29,36 ****
  
  module Bio
    class TestSiRNANew < Test::Unit::TestCase
      def test_new
!       srand(1)
!       naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
        assert(Bio::SiRNA.new(naseq))
        assert(Bio::SiRNA.new(naseq, 21))
--- 29,38 ----
  
  module Bio
+ 
+   RANDOM_SEQ = "ctttcggtgcggacgtaaggagtattcctgtactaactaaatggagttaccaaggtaggaccacggtaaaatcgcgagcagcctcgatacaagcgttgtgctgaagcctatcgctgacctgaaggggggcgtaagcaaggcagcggttcaccttcatcagttctgctagaaatcacctagcaccccttatcatccgcgtcaggtccattacccttcccattatgtcggactcaattgaggtgcttgtgaacttatacttgaatccaaaacgtctactgtattggcgactaaaaagcacttgtggggagtcggcttgatcagcctccattagggccaggcactgaggatcatccagttaacgtcagattcaaggtctggctcttagcactcggagttgcac"
+ 
    class TestSiRNANew < Test::Unit::TestCase
      def test_new
!       naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
        assert(Bio::SiRNA.new(naseq))
        assert(Bio::SiRNA.new(naseq, 21))
***************
*** 44,49 ****
    class TestSiRNA < Test::Unit::TestCase
      def setup
!       srand(1)
!       naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
        @obj = Bio::SiRNA.new(naseq)
      end
--- 46,50 ----
    class TestSiRNA < Test::Unit::TestCase
      def setup
!       naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
        @obj = Bio::SiRNA.new(naseq)
      end
***************
*** 117,122 ****
    class TestSiRNAPair < Test::Unit::TestCase
      def setup
!       srand(1)
!       naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
        @obj = Bio::SiRNA.new(naseq).design.first
      end
--- 118,122 ----
    class TestSiRNAPair < Test::Unit::TestCase
      def setup
!       naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
        @obj = Bio::SiRNA.new(naseq).design.first
      end
***************
*** 176,181 ****
    class TestShRNA < Test::Unit::TestCase
      def setup
!       srand(1)
!       naseq = Bio::Sequence::NA.new("ACGT" * 100).randomize
        sirna = Bio::SiRNA.new(naseq)
        pairs = sirna.design
--- 176,180 ----
    class TestShRNA < Test::Unit::TestCase
      def setup
!       naseq = Bio::Sequence::NA.new(RANDOM_SEQ)
        sirna = Bio::SiRNA.new(naseq)
        pairs = sirna.design
***************
*** 247,251 ****
        3'-CCUGCAUUCCUCAUAAGGACACACACGACAGGUGUCCUUAUGAGGAAUGCAGGAAAA-5'
  END
!       @obj.design
        assert_equal(report, @obj.report)
      end
--- 246,251 ----
        3'-CCUGCAUUCCUCAUAAGGACACACACGACAGGUGUCCUUAUGAGGAAUGCAGGAAAA-5'
  END
!       #@obj.design
!       @obj.block_it
        assert_equal(report, @obj.report)
      end



More information about the bioruby-cvs mailing list