[BioRuby-cvs] bioruby/test/unit/bio/db/embl test_embl.rb,1.2,1.3

Mitsuteru C. Nakao nakao at pub.open-bio.org
Wed Nov 23 05:02:44 EST 2005


Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl
In directory pub.open-bio.org:/tmp/cvs-serv16264/test/unit/bio/db/embl

Modified Files:
	test_embl.rb 
Log Message:
* Fixed the order of arguments of assert_equal.


Index: test_embl.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_embl.rb,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** test_embl.rb	27 Oct 2005 09:38:12 -0000	1.2
--- test_embl.rb	23 Nov 2005 10:02:42 -0000	1.3
***************
*** 47,90 ****
  
      def test_id_line_entry_name
!       assert_equal(@obj.id_line('ENTRY_NAME'), 'AB090716')
      end
  
      def test_id_line_data_class
!       assert_equal(@obj.id_line('DATA_CLASS'), 'standard')
      end
  
      def test_id_line_molecule_type
!       assert_equal(@obj.id_line('MOLECULE_TYPE'), 'genomic DNA')
      end
  
      def test_id_line_division
!       assert_equal(@obj.id_line('DIVISION'), 'VRT')
      end
  
      def test_id_line_sequence_length
!       assert_equal(@obj.id_line('SEQUENCE_LENGTH'), 166)
      end
      
      def test_entry
        entry_id = 'AB090716'
!       assert_equal(@obj.entry, entry_id)
!       assert_equal(@obj.entry_name, entry_id)
!       assert_equal(@obj.entry_id, entry_id)
      end
  
      def test_molecule
        molecule = 'genomic DNA'
!       assert_equal(@obj.molecule, molecule)
!       assert_equal(@obj.molecule_type, molecule)
      end
  
      def test_division
!       assert_equal(@obj.division, 'VRT')
      end
      
      def test_sequence_length
        seqlen = 166
!       assert_equal(@obj.sequence_length, seqlen)
!       assert_equal(@obj.seqlen, seqlen)
      end
  
--- 47,90 ----
  
      def test_id_line_entry_name
!       assert_equal('AB090716', @obj.id_line('ENTRY_NAME'))
      end
  
      def test_id_line_data_class
!       assert_equal('standard', @obj.id_line('DATA_CLASS'))
      end
  
      def test_id_line_molecule_type
!       assert_equal('genomic DNA', @obj.id_line('MOLECULE_TYPE'))
      end
  
      def test_id_line_division
!       assert_equal('VRT', @obj.id_line('DIVISION'))
      end
  
      def test_id_line_sequence_length
!       assert_equal(166, @obj.id_line('SEQUENCE_LENGTH'))
      end
      
      def test_entry
        entry_id = 'AB090716'
!       assert_equal(entry_id, @obj.entry)
!       assert_equal(entry_id, @obj.entry_name)
!       assert_equal(entry_id, @obj.entry_id)
      end
  
      def test_molecule
        molecule = 'genomic DNA'
!       assert_equal(molecule, @obj.molecule)
!       assert_equal(molecule, @obj.molecule_type)
      end
  
      def test_division
!       assert_equal('VRT', @obj.division)
      end
      
      def test_sequence_length
        seqlen = 166
!       assert_equal(seqlen, @obj.sequence_length)
!       assert_equal(seqlen, @obj.seqlen)
      end
  
***************
*** 92,110 ****
      def test_ac 
        ac = ['AB090716']
!       assert_equal(@obj.ac, ac)
!       assert_equal(@obj.accessions, ac)
      end
  
      # Bio::EMBLDB::COMMON#accession
      def test_accession
!       assert_equal(@obj.accession, 'AB090716')
      end
  
      def test_sv
!       assert_equal(@obj.sv, 'AB090716.1')
      end
  
      def test_version
!       assert_equal(@obj.version, 1)
      end
  
--- 92,110 ----
      def test_ac 
        ac = ['AB090716']
!       assert_equal(ac, @obj.ac)
!       assert_equal(ac, @obj.accessions)
      end
  
      # Bio::EMBLDB::COMMON#accession
      def test_accession
!       assert_equal('AB090716', @obj.accession)
      end
  
      def test_sv
!       assert_equal('AB090716.1', @obj.sv)
      end
  
      def test_version
!       assert_equal(1, @obj.version)
      end
  
***************
*** 118,131 ****
  
      def test_dt_created
!       assert_equal(@obj.dt('created'), '25-OCT-2002 (Rel. 73, Created)')
      end
  
      def test_dt_updated
!       assert_equal(@obj.dt('updated'), '29-NOV-2002 (Rel. 73, Last updated, Version 2)')
      end
  
      # Bio::EMBLDB::COMMON#de
      def test_de
!       assert_equal(@obj.de, "Haplochromis sp. 'muzu, rukwa' LWS gene for long wavelength-sensitive opsin, partial cds, specimen_voucher:specimen No. HT-9361.")
      end
  
--- 118,131 ----
  
      def test_dt_created
!       assert_equal('25-OCT-2002 (Rel. 73, Created)', @obj.dt('created'))
      end
  
      def test_dt_updated
!       assert_equal('29-NOV-2002 (Rel. 73, Last updated, Version 2)', @obj.dt('updated'))
      end
  
      # Bio::EMBLDB::COMMON#de
      def test_de
!       assert_equal("Haplochromis sp. 'muzu, rukwa' LWS gene for long wavelength-sensitive opsin, partial cds, specimen_voucher:specimen No. HT-9361.", @obj.de)
      end
  
***************
*** 133,142 ****
      def test_kw 
        k = []
!       assert_equal(@obj.kw, [])
!       assert_equal(@obj.keywords, [])
      end
  
      def test_os
! #      assert_equal(@obj.os, '')
        assert_raises(RuntimeError) { @obj.os }
      end
--- 133,142 ----
      def test_kw 
        k = []
!       assert_equal([], @obj.kw)
!       assert_equal([], @obj.keywords)
      end
  
      def test_os
! #      assert_equal('', @obj.os)
        assert_raises(RuntimeError) { @obj.os }
      end
***************
*** 144,196 ****
      def test_os_valid
        @obj.instance_eval { @data['OS'] = "Haplochromis sp. 'muzu rukwa'" }
!       assert_equal(@obj.os, "Haplochromis sp. 'muzu rukwa'")
      end
  
      # Bio::EMBLDB::COMMON#oc
      def test_oc 
!       assert_equal(@obj.oc.first, 'Eukaryota')
      end
  
      # Bio::EMBLDB::COMMON#og
      def test_og 
!       assert_equal(@obj.og, [])
      end
  
      # Bio::EMBLDB::COMMON#ref
      def test_ref
!       assert_equal(@obj.ref.size, 2)
      end
  
      # Bio::EMBLDB::COMMON#references
      def test_references 
!       assert_equal(@obj.references.class, Bio::References)
      end
  
      # Bio::EMBLDB::COMMON#dr
      def test_dr
!       assert_equal(@obj.dr, {})
      end
  
      def test_fh
!       assert_equal(@obj.fh, 'Key Location/Qualifiers')
      end
  
      def test_ft
!       assert_equal(@obj.ft.class, Bio::Features)
      end
  
      def test_ft_iterator
        @obj.ft.each do |feature|
!         assert_equal(feature.class, Bio::Feature)
        end
      end
  
      def test_ft_accessor
!       assert_equal(@obj.ft.features[1].feature, 'CDS')
      end
  
      def test_each_cds
        @obj.each_cds do |x|
!         assert_equal(x.feature, 'CDS')
        end
      end
--- 144,196 ----
      def test_os_valid
        @obj.instance_eval { @data['OS'] = "Haplochromis sp. 'muzu rukwa'" }
!       assert_equal("Haplochromis sp. 'muzu rukwa'", @obj.os)
      end
  
      # Bio::EMBLDB::COMMON#oc
      def test_oc 
!       assert_equal('Eukaryota', @obj.oc.first)
      end
  
      # Bio::EMBLDB::COMMON#og
      def test_og 
!       assert_equal([], @obj.og)
      end
  
      # Bio::EMBLDB::COMMON#ref
      def test_ref
!       assert_equal(2, @obj.ref.size)
      end
  
      # Bio::EMBLDB::COMMON#references
      def test_references 
!       assert_equal(Bio::References, @obj.references.class)
      end
  
      # Bio::EMBLDB::COMMON#dr
      def test_dr
!       assert_equal({}, @obj.dr)
      end
  
      def test_fh
!       assert_equal('Key Location/Qualifiers', @obj.fh)
      end
  
      def test_ft
!       assert_equal(Bio::Features, @obj.ft.class)
      end
  
      def test_ft_iterator
        @obj.ft.each do |feature|
!         assert_equal(Bio::Feature, feature.class)
        end
      end
  
      def test_ft_accessor
!       assert_equal('CDS', @obj.ft.features[1].feature)
      end
  
      def test_each_cds
        @obj.each_cds do |x|
!         assert_equal('CDS', x.feature)
        end
      end
***************
*** 198,207 ****
      def test_each_gene
        @obj.each_gene do |x| 
!         assert_equal(x.feature, 'gene')
        end
      end
  
      def test_cc
!       assert_equal(@obj.cc, '')
      end
  
--- 198,207 ----
      def test_each_gene
        @obj.each_gene do |x| 
!         assert_equal('gene', x.feature)
        end
      end
  
      def test_cc
!       assert_equal('', @obj.cc)
      end
  
***************
*** 211,226 ****
      def test_sq
        data = {"a"=>29, "c"=>42, "ntlen"=>166, "g"=>41, "t"=>54, "other"=>0}
!       assert_equal(@obj.sq, data)
      end
  
      def test_sq_get
!       assert_equal(@obj.sq("a"), 29)
      end
  
      def test_seq
        seq = 'gttctggcctcatggactgaagacttcctgtggacctgatgtgttcagtggaagtgaagaccctggagtacagtcctacatgattgttctcatgattacttgctgtttcatccccctggctatcatcatcctgtgctaccttgctgtgtggatggccatccgtgct'
!       assert_equal(@obj.seq, seq)
!       assert_equal(@obj.naseq, seq)
!       assert_equal(@obj.ntseq, seq)
      end
    end
--- 211,226 ----
      def test_sq
        data = {"a"=>29, "c"=>42, "ntlen"=>166, "g"=>41, "t"=>54, "other"=>0}
!       assert_equal(data, @obj.sq)
      end
  
      def test_sq_get
!       assert_equal(29, @obj.sq("a"))
      end
  
      def test_seq
        seq = 'gttctggcctcatggactgaagacttcctgtggacctgatgtgttcagtggaagtgaagaccctggagtacagtcctacatgattgttctcatgattacttgctgtttcatccccctggctatcatcatcctgtgctaccttgctgtgtggatggccatccgtgct'
!       assert_equal(seq, @obj.seq)
!       assert_equal(seq, @obj.naseq)
!       assert_equal(seq, @obj.ntseq)
      end
    end



More information about the bioruby-cvs mailing list