Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed small bug in test code: test could only be run from the test/un…

…it directory.

git-svn-id: svn+ssh://rubyforge.org/var/svn/bio-graphics@20 a2f46d20-7dc0-45cf-9d05-bfa4e4ff58eb
  • Loading branch information...
commit 2b3938c2a92f198fdafce514da6af448530155f1 1 parent c9ad5c0
jandot authored
Showing with 9 additions and 11 deletions.
  1. +9 −11 trunk/test/unit/test_draw.rb
View
20 trunk/test/unit/test_draw.rb
@@ -33,11 +33,10 @@ def test_draw_showcase
directed_spliced_track.add_feature('gene5','complement(join(170..231,264..299,350..360,409..445))', 'http://bioinformatics.roslin.ac.uk')
directed_spliced_track.add_feature('gene6','join(134..152,209..283)')
- my_panel.draw('glyph_showcase.png')
-
- system("display glyph_showcase.png & sleep 1 && kill $!")
-
- File.delete('glyph_showcase.png')
+ output_file = File.dirname(__FILE__) + '/output.png'
+ my_panel.draw(output_file)
+ system("display " + output_file + "& sleep 2 && kill $!")
+ File.delete(output_file)
end
def test_arkdb_features
@@ -54,7 +53,7 @@ def test_arkdb_features
clone_track.colour = [0,0,1]
# Add data to tracks
- File.open('data.txt').each do |line|
+ File.open(File.dirname(__FILE__) + '/data.txt').each do |line|
line.chomp!
accession, type, start, stop = line.split(/\t/)
if type == 'scaffold'
@@ -72,11 +71,10 @@ def test_arkdb_features
end
# And draw
- my_panel.draw('my_panel.png')
-
- system("display my_panel.png & sleep 1 && kill $!")
-
- File.delete('my_panel.png')
+ output_file = File.dirname(__FILE__) + '/output.png'
+ my_panel.draw(output_file)
+ system("display " + output_file + "& sleep 2 && kill $!")
+ File.delete(output_file)
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.