Permalink
Browse files

fixed two tests that used @contigs

  • Loading branch information...
1 parent 0179d2a commit 89f75225c431203277f23a6bd473d3eef2617a2e @fstrozzi fstrozzi committed Jan 6, 2011
Showing with 8 additions and 4 deletions.
  1. +8 −4 test/test_bio-assembly.rb
View
@@ -4,11 +4,15 @@ class TestBioAssembly < Test::Unit::TestCase
def setup
ace_filename = File.join('data', 'example1.ace')
- @obj = Bio::Assembly.create(ace_filename, :ace)
+ @obj = Bio::Assembly.open(ace_filename, :ace)
# pick a contig to do in depth tests on
@contig = nil
- @obj.each_contig { |c| @contig = c if c.name.to_i == 5 }
+ @tot_contig = []
+ @obj.each_contig do |c|
+ @contig = c if c.name.to_i == 5
+ @tot_contig << c
+ end
# pick a read to do in depth tests on
@read = nil
@@ -17,13 +21,13 @@ def setup
def test_num_contigs_parsed
contigs_parsed = 13
- assert_equal(contigs_parsed, @obj.contigs.size)
+ assert_equal(contigs_parsed, @tot_contig.size)
end
def test_num_reads_parsed
reads_parsed_known = 1760
reads_parsed = 0
- @obj.contigs.each { |c| reads_parsed += c.reads.size }
+ @tot_contig.each { |c| reads_parsed += c.reads.size }
assert_equal(reads_parsed_known, reads_parsed)
end

0 comments on commit 89f7522

Please sign in to comment.