Sha256: 0338554dd1ee446fbb1ab38567007cf0e141f69461b2a7f5fc9c435931c7c86d
Contents?: true
Size: 928 Bytes
Versions: 708
Compression:
Stored size: 928 Bytes
Contents
require File.join(File.expand_path(File.dirname(__FILE__)), '../../..', 'test_helper.rb') require 'rbbt/tsv' require 'rbbt/tsv/parallel' class TestTSVParallelThrough < Test::Unit::TestCase def test_pthrough tsv = datafile_test('identifiers').tsv :unnamed => true, :persist => false, :fields => ["Associated Gene Name"] h = {} tsv.monitor = true tsv.unnamed = true tsv.pthrough do |k,v| h[k] = v.first end assert_equal tsv.size, h.size assert_equal tsv.keys.sort, h.keys.sort end def test_ppthrough tsv = datafile_test('identifiers').tsv :unnamed => true, :persist => false, :fields => ["Associated Gene Name"] h = {} tsv.ppthrough_callback do |k,v| h[k] = v end tsv.unnamed = true tsv.monitor = true tsv.ppthrough(3) do |k,v| [k,v.first] end assert_equal tsv.size, h.size assert_equal tsv.keys.sort, h.keys.sort end end
Version data entries
708 entries across 708 versions & 1 rubygems