summaryrefslogtreecommitdiff
path: root/test/model-classification.rb
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-05-26 12:53:01 +0000
committergebele <gebele@in-silico.ch>2017-05-26 12:53:01 +0000
commit6ed197736516d98e200cc64d922f42eb3122589c (patch)
treed2c7de76b020be254cc82563d36e6711fd6f1867 /test/model-classification.rb
parent61a7d994d8f4fbcf25414beea96189bf885ad19d (diff)
parent9aa5203dd375225996c1efe4be1a4324ddc6cda7 (diff)
Merge branch 'development'
Diffstat (limited to 'test/model-classification.rb')
-rw-r--r--test/model-classification.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/model-classification.rb b/test/model-classification.rb
index 1424f6a..f75598b 100644
--- a/test/model-classification.rb
+++ b/test/model-classification.rb
@@ -46,12 +46,14 @@ class LazarClassificationTest < MiniTest::Test
assert_equal compound_dataset.compounds, prediction_dataset.compounds
cid = prediction_dataset.compounds[7].id.to_s
- assert_equal "Could not find similar substances with experimental data in the training dataset.", prediction_dataset.predictions[cid][:warning]
+ assert_equal "Could not find similar substances with experimental data in the training dataset.", prediction_dataset.predictions[cid][:warnings][0]
+ expectations = ["Cannot create prediction: Only one similar compound in the training set.",
+ "Could not find similar substances with experimental data in the training dataset."]
prediction_dataset.predictions.each do |cid,pred|
- assert_equal "Could not find similar substances with experimental data in the training dataset.", pred[:warning] if pred[:value].nil?
+ assert_includes expectations, pred[:warnings][0] if pred[:value].nil?
end
cid = Compound.from_smiles("CCOC(=O)N").id.to_s
- assert_match "excluded", prediction_dataset.predictions[cid][:warning]
+ assert_match "excluded", prediction_dataset.predictions[cid][:info]
# cleanup
[training_dataset,model,compound_dataset,prediction_dataset].each{|o| o.delete}
end