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

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


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

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


Index: test_sptr.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_sptr.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_sptr.rb	27 Oct 2005 09:28:43 -0000	1.1
--- test_sptr.rb	23 Nov 2005 10:06:12 -0000	1.2
***************
*** 42,86 ****
  
      def test_id_line_entry_name
!       assert_equal(@obj.id_line('ENTRY_NAME'), 'P53_HUMAN')
      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'), 'PRT')
      end
  
      def test_id_line_sequence_length
!       assert_equal(@obj.id_line('SEQUENCE_LENGTH'), 393)
      end
  
      def test_entry
        entry = 'P53_HUMAN'
!       assert_equal(@obj.entry, entry)
!       assert_equal(@obj.entry_name, entry)
!       assert_equal(@obj.entry_id, entry)
      end
  
      def test_molecule
!       assert_equal(@obj.molecule, 'PRT')
!       assert_equal(@obj.molecule_type, 'PRT')
      end
  
      def test_sequence_length
        seqlen = 393
!       assert_equal(@obj.sequence_length, seqlen)
!       assert_equal(@obj.aalen, seqlen)
      end
  
      def test_ac
        acs = ["P04637", "Q15086", "Q15087", "Q15088", "Q16535", "Q16807", "Q16808", "Q16809", "Q16810", "Q16811", "Q16848", "Q86UG1", "Q8J016", "Q99659", "Q9BTM4", "Q9HAQ8", "Q9NP68", "Q9NPJ2", "Q9NZD0", "Q9UBI2", "Q9UQ61"]
!       assert_equal(@obj.ac, acs)
!       assert_equal(@obj.accessions, acs)
      end
  
      def test_accession
!       assert_equal(@obj.accession, 'P04637')
      end
  
--- 42,86 ----
  
      def test_id_line_entry_name
!       assert_equal('P53_HUMAN', @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('PRT', @obj.id_line('MOLECULE_TYPE'))
      end
  
      def test_id_line_sequence_length
!       assert_equal(393, @obj.id_line('SEQUENCE_LENGTH'))
      end
  
      def test_entry
        entry = 'P53_HUMAN'
!       assert_equal(entry, @obj.entry)
!       assert_equal(entry, @obj.entry_name)
!       assert_equal(entry, @obj.entry_id)
      end
  
      def test_molecule
!       assert_equal('PRT', @obj.molecule)
!       assert_equal('PRT', @obj.molecule_type)
      end
  
      def test_sequence_length
        seqlen = 393
!       assert_equal(seqlen, @obj.sequence_length)
!       assert_equal(seqlen, @obj.aalen)
      end
  
      def test_ac
        acs = ["P04637", "Q15086", "Q15087", "Q15088", "Q16535", "Q16807", "Q16808", "Q16809", "Q16810", "Q16811", "Q16848", "Q86UG1", "Q8J016", "Q99659", "Q9BTM4", "Q9HAQ8", "Q9NP68", "Q9NPJ2", "Q9NZD0", "Q9UBI2", "Q9UQ61"]
!       assert_equal(acs, @obj.ac)
!       assert_equal(acs, @obj.accessions)
      end
  
      def test_accession
!       assert_equal('P04637', @obj.accession)
      end
  
***************
*** 90,102 ****
  
      def test_dt_created
!       assert_equal(@obj.dt('created'), '13-AUG-1987 (Rel. 05, Created)')
      end
  
      def test_dt_sequence
!       assert_equal(@obj.dt('sequence'), '01-MAR-1989 (Rel. 10, Last sequence update)')
      end
  
      def test_dt_annotation
!       assert_equal(@obj.dt('annotation'), '13-SEP-2005 (Rel. 48, Last annotation update)')
      end
  
--- 90,102 ----
  
      def test_dt_created
!       assert_equal('13-AUG-1987 (Rel. 05, Created)', @obj.dt('created'))
      end
  
      def test_dt_sequence
!       assert_equal('01-MAR-1989 (Rel. 10, Last sequence update)', @obj.dt('sequence'))
      end
  
      def test_dt_annotation
!       assert_equal('13-SEP-2005 (Rel. 48, Last annotation update)', @obj.dt('annotation'))
      end
  
***************
*** 106,136 ****
  
      def test_protein_name
!       assert_equal(@obj.protein_name, "Cellular tumor antigen p53")
      end
  
      def test_synonyms
!       assert_equal(@obj.synonyms, ["Tumor suppressor p53", "Phosphoprotein p53", "Antigen NY-CO-13"])
      end
  
      def test_gn
!       assert_equal(@obj.gn, [{:orfs=>[], :synonyms=>["P53"], :name=>"TP53", :loci=>[]}])
      end
  
      def test_gn_uniprot_parser
        gn_uniprot_data = ''
!       assert_equal(@obj.instance_eval("gn_uniprot_parser"), [{:orfs=>[], :loci=>[], :name=>"TP53", :synonyms=>["P53"]}])
      end
  
      def test_gn_old_parser
        gn_old_data = ''
!       assert_equal(@obj.instance_eval("gn_old_parser"), [["Name=TP53; Synonyms=P53;"]])
      end
  
      def test_gene_names
!       assert_equal(@obj.gene_names, ["TP53"])
      end
  
      def test_gene_name
!       assert_equal(@obj.gene_name, 'TP53')
      end
  
--- 106,136 ----
  
      def test_protein_name
!       assert_equal("Cellular tumor antigen p53", @obj.protein_name)
      end
  
      def test_synonyms
!       assert_equal(["Tumor suppressor p53", "Phosphoprotein p53", "Antigen NY-CO-13"], @obj.synonyms)
      end
  
      def test_gn
!       assert_equal([{:orfs=>[], :synonyms=>["P53"], :name=>"TP53", :loci=>[]}], @obj.gn)
      end
  
      def test_gn_uniprot_parser
        gn_uniprot_data = ''
!       assert_equal([{:orfs=>[], :loci=>[], :name=>"TP53", :synonyms=>["P53"]}], @obj.instance_eval("gn_uniprot_parser"))
      end
  
      def test_gn_old_parser
        gn_old_data = ''
!       assert_equal([["Name=TP53; Synonyms=P53;"]], @obj.instance_eval("gn_old_parser"))
      end
  
      def test_gene_names
!       assert_equal(["TP53"], @obj.gene_names)
      end
  
      def test_gene_name
!       assert_equal('TP53', @obj.gene_name)
      end
  
***************
*** 140,148 ****
  
      def test_os_access
!       assert_equal(@obj.os(0), "Homo sapiens (Human)")
      end
  
      def test_os_access2
!       assert_equal(@obj.os[0], {"name"=>"(Human)", "os"=>"Homo sapiens"})
      end
  
--- 140,148 ----
  
      def test_os_access
!       assert_equal("Homo sapiens (Human)", @obj.os(0))
      end
  
      def test_os_access2
!       assert_equal({"name"=>"(Human)", "os"=>"Homo sapiens"}, @obj.os[0])
      end
  
***************
*** 151,155 ****
        ary = ['Plastid', 'Chloroplast']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
--- 151,155 ----
        ary = ['Plastid', 'Chloroplast']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
***************
*** 158,162 ****
        ary = ['Mitochondrion']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
--- 158,162 ----
        ary = ['Mitochondrion']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
***************
*** 165,169 ****
        ary = ["Plasmid sym pNGR234a"]
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
--- 165,169 ----
        ary = ["Plasmid sym pNGR234a"]
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
***************
*** 172,176 ****
        ary = ['Plastid', 'Cyanelle']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
--- 172,176 ----
        ary = ['Plastid', 'Cyanelle']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
***************
*** 179,183 ****
        ary = ["Plasmid pSymA (megaplasmid 1)"]
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
--- 179,183 ----
        ary = ["Plasmid pSymA (megaplasmid 1)"]
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
***************
*** 186,198 ****
        ary = ['Plasmid pNRC100', 'Plasmid pNRC200', 'Plasmid pHH1']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(@obj.og, ary)
      end
  
      def test_oc
!       assert_equal(@obj.oc, ["Eukaryota", "Metazoa", "Chordata", "Craniata", "Vertebrata", "Euteleostomi", "Mammalia", "Eutheria", "Euarchontoglires", "Primates", "Catarrhini", "Hominidae", "Homo"])
      end
  
      def test_ox
!       assert_equal(@obj.ox, {"NCBI_TaxID"=>["9606"]})
      end
  
--- 186,198 ----
        ary = ['Plasmid pNRC100', 'Plasmid pNRC200', 'Plasmid pHH1']
        @obj.instance_eval("@orig['OG'] = '#{og}'")
!       assert_equal(ary, @obj.og)
      end
  
      def test_oc
!       assert_equal(["Eukaryota", "Metazoa", "Chordata", "Craniata", "Vertebrata", "Euteleostomi", "Mammalia", "Eutheria", "Euarchontoglires", "Primates", "Catarrhini", "Hominidae", "Homo"], @obj.oc)
      end
  
      def test_ox
!       assert_equal({"NCBI_TaxID"=>["9606"]}, @obj.ox)
      end
  
***************
*** 202,206 ****
  
      def test_cc
!       assert_equal(@obj.cc.class, Hash)
      end
     
--- 202,206 ----
  
      def test_cc
!       assert_equal(Hash, @obj.cc.class)
      end
     
***************
*** 210,214 ****
              {"NAME"=>"p53 web site at the Institut Curie", "WWW"=>"http://p53.curie.fr/", "FTP"=>nil, "NOTE"=>nil},
              {"NAME"=>"Atlas Genet. Cytogenet. Oncol. Haematol.", "WWW"=>"http://www.infobiogen.fr/services/chromcancer/Genes/P53ID88.html", "FTP"=>nil, "NOTE"=>nil}]
!       assert_equal(@obj.cc('DATABASE'), db)
      end
  
--- 210,214 ----
              {"NAME"=>"p53 web site at the Institut Curie", "WWW"=>"http://p53.curie.fr/", "FTP"=>nil, "NOTE"=>nil},
              {"NAME"=>"Atlas Genet. Cytogenet. Oncol. Haematol.", "WWW"=>"http://www.infobiogen.fr/services/chromcancer/Genes/P53ID88.html", "FTP"=>nil, "NOTE"=>nil}]
!       assert_equal(db, @obj.cc('DATABASE'))
      end
  
***************
*** 217,225 ****
                                                                    {"IsoId"=>"P04637-2", "Name"=>"2", "Synonyms"=>"I9RET", "Sequence"=>["VSP_006535", "VSP_006536"]}],
              "Event"=>"Alternative splicing"}
!       assert_equal(@obj.cc('ALTERNATIVE PRODUCTS'), ap)
      end
  
      def test_cc_mass_spectrometry
!       assert_equal(@obj.cc('MASS SPECTROMETRY'), nil)
      end
  
--- 217,225 ----
                                                                    {"IsoId"=>"P04637-2", "Name"=>"2", "Synonyms"=>"I9RET", "Sequence"=>["VSP_006535", "VSP_006536"]}],
              "Event"=>"Alternative splicing"}
!       assert_equal(ap, @obj.cc('ALTERNATIVE PRODUCTS'))
      end
  
      def test_cc_mass_spectrometry
!       assert_equal(nil, @obj.cc('MASS SPECTROMETRY'))
      end
  
***************
*** 228,232 ****
      def test_kw
        keywords = ["3D-structure", "Acetylation", "Activator", "Alternative splicing", "Anti-oncogene", "Apoptosis", "Cell cycle", "Disease mutation", "DNA-binding", "Glycoprotein", "Li-Fraumeni syndrome", "Metal-binding", "Nuclear protein", "Phosphorylation", "Polymorphism", "Transcription", "Transcription regulation", "Zinc"]
!       assert_equal(@obj.kw, keywords)
      end
      
--- 228,232 ----
      def test_kw
        keywords = ["3D-structure", "Acetylation", "Activator", "Alternative splicing", "Anti-oncogene", "Apoptosis", "Cell cycle", "Disease mutation", "DNA-binding", "Glycoprotein", "Li-Fraumeni syndrome", "Metal-binding", "Nuclear protein", "Phosphorylation", "Polymorphism", "Transcription", "Transcription regulation", "Zinc"]
!       assert_equal(keywords, @obj.kw)
      end
      
***************
*** 234,266 ****
        assert(@obj.ft)
        name = 'DNA_BIND'
!       assert_equal(@obj.ft(name), [{"FTId"=>nil, "From"=>102, "diff"=>[], "To"=>292, "Description"=>nil}])
      end
  
      def test_sq
!       assert_equal(@obj.sq, {"CRC64"=>"AD5C149FD8106131", "aalen"=>393, "MW"=>43653})
      end
  
      def test_sq_crc64
!       assert_equal(@obj.sq('CRC64'), "AD5C149FD8106131")
      end
  
      def test_sq_mw
        mw = 43653
!       assert_equal(@obj.sq('mw'), mw)
!       assert_equal(@obj.sq('molecular'), mw)
!       assert_equal(@obj.sq('weight'), mw)
      end
  
      def test_sq_len
        length = 393
!       assert_equal(@obj.sq('len'), length)
!       assert_equal(@obj.sq('length'), length)
!       assert_equal(@obj.sq('AA'), length)
      end
  
      def test_seq
        seq = 'MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD'
!       assert_equal(@obj.seq, seq)
!       assert_equal(@obj.aaseq, seq)
      end
  
--- 234,266 ----
        assert(@obj.ft)
        name = 'DNA_BIND'
!       assert_equal([{"FTId"=>nil, "From"=>102, "diff"=>[], "To"=>292, "Description"=>nil}], @obj.ft(name))
      end
  
      def test_sq
!       assert_equal({"CRC64"=>"AD5C149FD8106131", "aalen"=>393, "MW"=>43653}, @obj.sq)
      end
  
      def test_sq_crc64
!       assert_equal("AD5C149FD8106131", @obj.sq('CRC64'))
      end
  
      def test_sq_mw
        mw = 43653
!       assert_equal(mw, @obj.sq('mw'))
!       assert_equal(mw, @obj.sq('molecular'))
!       assert_equal(mw, @obj.sq('weight'))
      end
  
      def test_sq_len
        length = 393
!       assert_equal(length, @obj.sq('len'))
!       assert_equal(length, @obj.sq('length'))
!       assert_equal(length, @obj.sq('AA'))
      end
  
      def test_seq
        seq = 'MEEPQSDPSVEPPLSQETFSDLWKLLPENNVLSPLPSQAMDDLMLSPDDIEQWFTEDPGPDEAPRMPEAAPPVAPAPAAPTPAAPAPAPSWPLSSSVPSQKTYQGSYGFRLGFLHSGTAKSVTCTYSPALNKMFCQLAKTCPVQLWVDSTPPPGTRVRAMAIYKQSQHMTEVVRRCPHHERCSDSDGLAPPQHLIRVEGNLRVEYLDDRNTFRHSVVVPYEPPEVGSDCTTIHYNYMCNSSCMGGMNRRPILTIITLEDSSGNLLGRNSFEVRVCACPGRDRRTEEENLRKKGEPHHELPPGSTKRALPNNTSSSPQPKKKPLDGEYFTLQIRGRERFEMFRELNEALELKDAQAGKEPGGSRAHSSHLKSKKGQSTSRHKKLMFKTEGPDSD'
!       assert_equal(seq, @obj.seq)
!       assert_equal(seq, @obj.aaseq)
      end
  



More information about the bioruby-cvs mailing list