Sha256: 33e2f7b746315e46468e66a0e59bf83f323eca9cc935a4c85a146f00a3d4b0b3
Contents?: true
Size: 1.15 KB
Versions: 15
Compression:
Stored size: 1.15 KB
Contents
# # test/unit/bio/appl/meme/test_mast.rb - Unit test for Bio::Meme::Mast::Report # # Copyright:: Copyright (C) 2008 Adam Kraut <adamnkraut@gmail.com> # License:: The Ruby License # # loading helper routine for testing bioruby require 'pathname' load Pathname.new(File.join(File.dirname(__FILE__), ['..'] * 5, 'bioruby_test_helper.rb')).cleanpath.to_s # libraries needed for the tests require 'test/unit' require 'bio/appl/meme/mast/report' module Bio module TestMastReportData TEST_DATA = Pathname.new(File.join(BioRubyTestDataPath, 'meme')).cleanpath.to_s def self.example_mast_output File.join TEST_DATA, 'mast.out' end end class TestMastReport < Test::Unit::TestCase TEST_DATA = TestMastReportData::TEST_DATA def setup @report = Meme::Mast::Report.new(File.read(TestMastReportData.example_mast_output)) end def test_report_has_motifs obj = @report.motifs.first assert_kind_of(Meme::Motif, obj) end def test_parse_hit_list_with_bad_data data = "#heres\n2 bad data lines\n" assert_raises(RuntimeError) { Meme::Mast::Report.new(data) } end end # TestMastReport end # Bio
Version data entries
15 entries across 15 versions & 1 rubygems