[BioRuby-cvs] bioruby/test/unit/bio/db/kegg test_genes.rb,NONE,1.1
Mitsuteru C. Nakao
nakao at pub.open-bio.org
Tue Nov 8 06:07:56 EST 2005
Update of /home/repository/bioruby/bioruby/test/unit/bio/db/kegg
In directory pub.open-bio.org:/tmp/cvs-serv27234/test/unit/bio/db/kegg
Added Files:
test_genes.rb
Log Message:
* Initial import.
--- NEW FILE: test_genes.rb ---
#
# test/unit/bio/db/kegg/test_genes.rb - Unit test for Bio::KEGG::GENES
#
# Copyright (C) 2005 Mitsuteru Nakao <n at bioruby.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# $Id: test_genes.rb,v 1.1 2005/11/08 11:07:54 nakao Exp $
#
require 'pathname'
libpath = Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'lib')).cleanpath.to_s
$:.unshift(libpath) unless $:.include?(libpath)
require 'test/unit'
require 'bio/db/kegg/genes'
module Bio
class TestGenesDblinks < Test::Unit::TestCase
def setup
entry =<<END
DBLINKS TIGR: At3g05560
NCBI-GI: 15230008 42572267
END
@obj = Bio::KEGG::GENES.new(entry)
end
def test_dblinks_1
assert_equal(@obj.dblinks['TIGR'], 'At3g05560')
end
def test_dblinks_2
assert_equal(@obj.dblinks['NCBI-GI'], ['15230008', '42572267'])
end
end
end
More information about the bioruby-cvs
mailing list