rbbt-util 5.13.1 → 5.13.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ require 'rbbt/tsv/parallel'
4
4
 
5
5
  class TestTSVParallelThrough < Test::Unit::TestCase
6
6
 
7
- def test_traverse_tsv
7
+ def _test_traverse_tsv
8
8
  require 'rbbt/sources/organism'
9
9
 
10
10
  head = 100
@@ -23,7 +23,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
23
23
  assert_equal head, res.keys.compact.sort.length
24
24
  end
25
25
 
26
- def test_traverse_tsv_cpus
26
+ def _test_traverse_tsv_cpus
27
27
  require 'rbbt/sources/organism'
28
28
 
29
29
  head = 100
@@ -45,7 +45,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
45
45
  assert res.values.compact.flatten.uniq.length > 0
46
46
  end
47
47
 
48
- def test_traverse_stream
48
+ def _test_traverse_stream
49
49
  require 'rbbt/sources/organism'
50
50
 
51
51
  head = 1000
@@ -59,7 +59,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
59
59
  assert_equal head, res.keys.compact.sort.length
60
60
  end
61
61
 
62
- def test_traverse_stream_cpus
62
+ def _test_traverse_stream_cpus
63
63
  require 'rbbt/sources/organism'
64
64
 
65
65
  head = 1000
@@ -73,7 +73,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
73
73
  assert_equal head, res.keys.compact.sort.length
74
74
  end
75
75
 
76
- def test_traverse_stream_keys
76
+ def _test_traverse_stream_keys
77
77
  require 'rbbt/sources/organism'
78
78
 
79
79
  head = 1000
@@ -97,7 +97,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
97
97
  assert_equal res.sort, Organism.identifiers("Hsa").tsv(:head => head).keys.sort
98
98
  end
99
99
 
100
- def test_traverse_array
100
+ def _test_traverse_array
101
101
  require 'rbbt/sources/organism'
102
102
 
103
103
  array = []
@@ -119,7 +119,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
119
119
  assert_equal array, res
120
120
  end
121
121
 
122
- def test_traverse_array_threads
122
+ def _test_traverse_array_threads
123
123
  require 'rbbt/sources/organism'
124
124
 
125
125
  array = []
@@ -140,7 +140,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
140
140
  assert_equal array.sort, res.sort
141
141
  end
142
142
 
143
- def test_traverse_array_cpus
143
+ def _test_traverse_array_cpus
144
144
  require 'rbbt/sources/organism'
145
145
 
146
146
  array = []
@@ -155,7 +155,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
155
155
  assert_equal array.sort, res.sort
156
156
  end
157
157
 
158
- def test_traverse_benchmark
158
+ def _test_traverse_benchmark
159
159
  require 'rbbt/sources/organism'
160
160
 
161
161
  head = 2_000
@@ -177,7 +177,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
177
177
  end
178
178
  end
179
179
 
180
- def test_traverse_into_dumper
180
+ def _test_traverse_into_dumper
181
181
  require 'rbbt/sources/organism'
182
182
 
183
183
  head = 2_000
@@ -195,7 +195,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
195
195
  assert_equal head, res.size
196
196
  end
197
197
 
198
- def test_traverse_into_dumper_threads
198
+ def _test_traverse_into_dumper_threads
199
199
  require 'rbbt/sources/organism'
200
200
 
201
201
  head = 2_000
@@ -215,7 +215,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
215
215
  assert_equal head, res.size
216
216
  end
217
217
 
218
- def test_traverse_into_dumper_cpus
218
+ def _test_traverse_into_dumper_cpus
219
219
  require 'rbbt/sources/organism'
220
220
 
221
221
  head = 2_000
@@ -236,7 +236,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
236
236
 
237
237
  #{{{ TRAVERSE DUMPER
238
238
 
239
- def test_traverse_dumper
239
+ def _test_traverse_dumper
240
240
  require 'rbbt/sources/organism'
241
241
 
242
242
  head = 2_000
@@ -257,7 +257,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
257
257
  assert_equal head, res.size
258
258
  end
259
259
 
260
- def test_traverse_dumper_threads
260
+ def _test_traverse_dumper_threads
261
261
  require 'rbbt/sources/organism'
262
262
 
263
263
  head = 2_000
@@ -279,7 +279,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
279
279
  assert_equal head, res.size
280
280
  end
281
281
 
282
- def test_traverse_dumper_cpus
282
+ def _test_traverse_dumper_cpus
283
283
  require 'rbbt/sources/organism'
284
284
 
285
285
  head = 10_000
@@ -307,29 +307,26 @@ class TestTSVParallelThrough < Test::Unit::TestCase
307
307
  head = 2_000
308
308
  cpus = 2
309
309
 
310
- stream = Organism.identifiers("Hsa/jun2011").open
311
- dumper = TSV::Dumper.new Organism.identifiers("Hsa/jun2011").tsv_options
312
310
 
313
- assert_raise do
314
- begin
315
- TSV.traverse stream, :head => head, :cpus => cpus, :into => dumper do |k,v|
316
- k = k.first
317
- raise "STOP" if rand(100) < 1
318
- [k,v]
319
- end
320
- stream = dumper.stream
321
- stream.read
322
- stream.join
323
- rescue Exception
324
- Log.exception $!
325
- stream.abort if stream.respond_to? :abort
326
- stream.join if stream.respond_to? :join
327
- raise $!
311
+ 3.times do
312
+ stream = Organism.identifiers("Hsa/jun2011").open
313
+ dumper = TSV::Dumper.new Organism.identifiers("Hsa/jun2011").tsv_options
314
+ dumper.init
315
+
316
+ assert_raise do
317
+ TSV.traverse stream, :head => head, :cpus => cpus, :into => dumper do |k,v|
318
+ k = k.first
319
+ raise "STOP" if rand(100) < 1
320
+ [k,v]
321
+ end
322
+ stream = dumper.stream
323
+ stream.read
324
+ stream.join
328
325
  end
329
326
  end
330
327
  end
331
328
 
332
- def test_traverse_into_stream
329
+ def _test_traverse_into_stream
333
330
  size = 100
334
331
  array = (1..size).to_a.collect{|n| n.to_s}
335
332
  stream = TSV.traverse array, :into => :stream do |e|
@@ -338,7 +335,7 @@ class TestTSVParallelThrough < Test::Unit::TestCase
338
335
  assert_equal size, stream.read.split("\n").length
339
336
  end
340
337
 
341
- def test_traverse_progress
338
+ def _test_traverse_progress
342
339
  size = 1000
343
340
  array = (1..size).to_a.collect{|n| n.to_s}
344
341
  stream = TSV.traverse array, :bar => {:max => size, :desc => "Array"}, :cpus => 5, :into => :stream do |e|
@@ -3,7 +3,7 @@ require 'rbbt/tsv'
3
3
  require 'rbbt/tsv/filter'
4
4
 
5
5
  class TestTSVFilters < Test::Unit::TestCase
6
- def test_collect
6
+ def _test_collect
7
7
  content1 =<<-EOF
8
8
  #: :sep=/\\s+/#:case_insensitive=false
9
9
  #Id ValueA ValueB
@@ -19,7 +19,7 @@ row2 A B
19
19
  end
20
20
  end
21
21
 
22
- def test_through
22
+ def _test_through
23
23
  content1 =<<-EOF
24
24
  #: :sep=/\\s+/#:case_insensitive=false
25
25
  #Id ValueA ValueB
@@ -37,7 +37,7 @@ row2 A B
37
37
  end
38
38
  end
39
39
 
40
- def test_2_filters
40
+ def _test_2_filters
41
41
  content1 =<<-EOF
42
42
  #: :sep=/\\s+/#:case_insensitive=false
43
43
  #Id ValueA ValueB
@@ -64,7 +64,7 @@ row3 A C
64
64
  end
65
65
  end
66
66
 
67
- def test_filter_persistence
67
+ def _test_filter_persistence
68
68
  content1 =<<-EOF
69
69
  #: :sep=/\\s+/#:case_insensitive=false
70
70
  #Id ValueA ValueB
@@ -98,7 +98,7 @@ row3 A C
98
98
  end
99
99
  end
100
100
 
101
- def test_filter_persistence_update
101
+ def __test_filter_persistence_update
102
102
  content1 =<<-EOF
103
103
  #: :sep=/\\s+/#:case_insensitive=false
104
104
  #Id ValueA ValueB
@@ -165,7 +165,7 @@ row2 A B C
165
165
  end
166
166
  end
167
167
 
168
- def test_filename
168
+ def _test_filename
169
169
  content1 =<<-EOF
170
170
  #: :sep=/\\s+/#:case_insensitive=false
171
171
  #Id ValueA ValueB
@@ -70,7 +70,6 @@ class TestConcurrencyProcess < Test::Unit::TestCase
70
70
  q.clean
71
71
 
72
72
  q.join
73
-
74
73
  end
75
74
  end
76
75
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.13.1
4
+ version: 5.13.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-26 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake