Sha256: b91be92f6819002dffaeeb00bbba6c7503e5d5193e27792fa39b0f63026b797d
Contents?: true
Size: 1.04 KB
Versions: 3
Compression:
Stored size: 1.04 KB
Contents
# # test/functional/bio/io/test_ddbjrest.rb - Functional test for Bio::DDBJ::REST # # Copyright:: Copyright (C) 2011 # Naohisa Goto <ng@bioruby.org> # License:: The Ruby License # # loading helper routine for testing bioruby require 'pathname' load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 3, 'bioruby_test_helper.rb')).cleanpath.to_s # libraries needed for the tests require 'bio/io/ddbjrest' require 'test/unit' module Bio module NetTestDDBJREST class TestDDBJ < Test::Unit::TestCase def setup @obj = Bio::DDBJ::REST::DDBJ.new end def test_countBasePair text = @obj.countBasePair("AF237819") expected = { "a" => 47, "t" => 38, "g" => 48, "c" => 38 } h = {} text.each_line do |line| base, count, percent = line.split(/\t/) count = count.to_i h[base] = count if count > 0 end assert_equal(expected, h) end end #class TestDDBJ end #module NetTestDDBJREST end #module Bio
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
bio-1.4.3.0001 | test/network/bio/io/test_ddbjrest.rb |
bio-1.4.3 | test/network/bio/io/test_ddbjrest.rb |
bio-1.4.2 | test/functional/bio/io/test_ddbjrest.rb |