diff options
author | gebele <gebele@in-silico.ch> | 2017-03-31 15:08:14 +0000 |
---|---|---|
committer | gebele <gebele@in-silico.ch> | 2017-03-31 15:08:14 +0000 |
commit | 6201c1f3814628499e168bd99fddc5b65eb32fb5 (patch) | |
tree | d67dbfbc0c53cc2cd4f8594c6471dcc17c416239 /test/model-classification.rb | |
parent | db38c345fdc119edd8a892a5b0ba2c2a4b1cbe1f (diff) |
adjusted classification tests for min sim 0.1
Diffstat (limited to 'test/model-classification.rb')
-rw-r--r-- | test/model-classification.rb | 8 |
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 |