diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-06-27 15:56:16 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-06-27 15:56:16 +0200 |
commit | fa269567ccd7c2a2803b6e61c3d8cef32092d435 (patch) | |
tree | 5ce91a8cf2c3ab3be5d61b60e79078ffe59bcc4b /fminer.rb | |
parent | 9d3629c8dce831bd5dfb2fd50d778161e666c13e (diff) |
Added Fminer tests for hit count
Diffstat (limited to 'fminer.rb')
-rw-r--r-- | fminer.rb | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -56,10 +56,26 @@ class FminerTest < Test::Unit::TestCase "prediction_feature" => feature, "backbone" => true, "min_frequency" => 2, + "nr_hits" => true, :subjectid => @@subjectid }) dump assert_equal 41, @dataset.features.size # 32 bit #assert_equal 52, @dataset.features.size + @dataset.data_entries.each { |c,e| + if c.to_s.scan('InChI=1S/C14H19N3S.ClH/c1-16(2)9-10-17(12-13-6-5-11-18-13)14-7-3-4-8-15-14;/h3-8,11H,9-10,12H2,1-2H3;1H').size > 0 + e.each { |p,h| + if p.to_s.scan('39').size>0 + assert_equal 6, h[0] + end + if p.to_s.scan('18').size>0 + assert_equal 5, h[0] + end + if p.to_s.scan('38').size>0 + assert_equal 14, h[0] + end + } + end + } cleanup end |