From 6201c1f3814628499e168bd99fddc5b65eb32fb5 Mon Sep 17 00:00:00 2001 From: gebele Date: Fri, 31 Mar 2017 15:08:14 +0000 Subject: adjusted classification tests for min sim 0.1 --- test/model-classification.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'test/model-classification.rb') 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 -- cgit v1.2.3