[BioRuby-cvs] bioruby/test/unit/bio/db/embl test_uniprot.rb, 1.1,
1.2
Mitsuteru C. Nakao
nakao at pub.open-bio.org
Wed Nov 23 05:12:12 EST 2005
Update of /home/repository/bioruby/bioruby/test/unit/bio/db/embl
In directory pub.open-bio.org:/tmp/cvs-serv16340/test/unit/bio/db/embl
Modified Files:
test_uniprot.rb
Log Message:
* Fixed the order of arguments of assert_equal.
Index: test_uniprot.rb
===================================================================
RCS file: /home/repository/bioruby/bioruby/test/unit/bio/db/embl/test_uniprot.rb,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** test_uniprot.rb 27 Oct 2005 09:28:43 -0000 1.1
--- test_uniprot.rb 23 Nov 2005 10:12:09 -0000 1.2
***************
*** 41,63 ****
end
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_ac
! assert_equal(@obj.ac, [])
! assert_equal(@obj.acccessions, [])
end
def test_accession
! assert_equal(@obj.accession, '')
end
--- 41,63 ----
end
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_ac
! assert_equal([], @obj.ac)
! assert_equal([], @obj.acccessions)
end
def test_accession
! assert_equal('', @obj.accession)
end
***************
*** 67,95 ****
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(gn_uniprot_data)), '')
end
# def test_gn_old_parser
# gn_old_data = ''
! # assert_equal(@obj.instance_eval(gn_old_parser(gn_old_data)), '')
# end
def test_gene_names
! assert_equal(@obj.gene_names, ["TP53"])
end
def test_gene_name
! assert_equal(@obj.gene_name, 'TP53')
end
--- 67,95 ----
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('', @obj.instance_eval(gn_uniprot_parser(gn_uniprot_data)))
end
# def test_gn_old_parser
# gn_old_data = ''
! # assert_equal('', @obj.instance_eval(gn_old_parser(gn_old_data)))
# end
def test_gene_names
! assert_equal(["TP53"], @obj.gene_names)
end
def test_gene_name
! assert_equal('TP53', @obj.gene_name)
end
***************
*** 97,105 ****
assert(@obj.os)
end
def test_os_access
! assert_equal(@obj.os(1), {'name' => '', 'os' => ''})
end
def test_os_access2
! assert_equal(@obj.os[1], {})
end
--- 97,107 ----
assert(@obj.os)
end
+
def test_os_access
! assert_equal({'name' => '', 'os' => ''}, @obj.os(1))
end
+
def test_os_access2
! assert_equal({}, @obj.os[1])
end
***************
*** 107,126 ****
def test_cc
data = ''
! assert_equal(@obj.instance_eval(cc_scan_alternative_products(data)), '')
data = ''
! assert_equal(@obj.instance_eval(cc_scan_database(data)), '')
data = ''
! assert_equal(@obj.instance_eval(cc_scan_mass_spectorometry(data)), '')
! assert_equal(@obj.cc, [])
end
def test_cc_database
! assert_equal(@obj.cc('DATABASE'), [])
end
def test_cc_alternative_products
! assert_equal(@obj.cc('ALTERNATIVE PRODUCTS'), {})
end
def test_cc_mass_spectrometry
! assert_equal(@obj.cc('MASS SPECTROMETRY'), [])
end
--- 109,128 ----
def test_cc
data = ''
! assert_equal('', @obj.instance_eval(cc_scan_alternative_products(data)))
data = ''
! assert_equal('', @obj.instance_eval(cc_scan_database(data)))
data = ''
! assert_equal('', @obj.instance_eval(cc_scan_mass_spectorometry(data)))
! assert_equal([], @obj.cc)
end
def test_cc_database
! assert_equal([], @obj.cc('DATABASE'))
end
def test_cc_alternative_products
! assert_equal({}, @obj.cc('ALTERNATIVE PRODUCTS'))
end
def test_cc_mass_spectrometry
! assert_equal([], @obj.cc('MASS SPECTROMETRY'))
end
***************
*** 133,137 ****
END
@obj.instance_eval('@orig["CC"] = "#{data}"')
! assert_equal(@obj.cc('INTERACTION'), '')
end
--- 135,139 ----
END
@obj.instance_eval('@orig["CC"] = "#{data}"')
! assert_equal('', @obj.cc('INTERACTION'))
end
***************
*** 143,167 ****
assert(@obj.ft)
name = 'DNA_BIND'
! assert_equal(@obj.ft(name), [])
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
end
--- 145,169 ----
assert(@obj.ft)
name = 'DNA_BIND'
! assert_equal([], @obj.ft(name))
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
end
More information about the bioruby-cvs
mailing list