summaryrefslogtreecommitdiff
path: root/test/dataset.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/dataset.rb')
-rw-r--r--test/dataset.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/dataset.rb b/test/dataset.rb
index 4f1e885..1814081 100644
--- a/test/dataset.rb
+++ b/test/dataset.rb
@@ -127,7 +127,7 @@ class DatasetTest < MiniTest::Test
original_csv.shift
csv.each_with_index do |row,i|
compound = Compound.from_smiles row.shift
- original_compound = Compound.from_smiles original_csv[i].shift
+ original_compound = Compound.from_smiles original_csv[i].shift.strip
assert_equal original_compound.inchi, compound.inchi
row.each_with_index do |v,j|
if v.numeric?
@@ -142,7 +142,6 @@ class DatasetTest < MiniTest::Test
def test_from_csv
d = Dataset.from_csv_file "#{DATA_DIR}/hamster_carcinogenicity.csv"
- p d
assert_equal Dataset, d.class
assert_equal 1, d.features.size
assert_equal 85, d.compounds.size
@@ -170,8 +169,7 @@ class DatasetTest < MiniTest::Test
def test_from_csv2
File.open("#{DATA_DIR}/temp_test.csv", "w+") { |file| file.write("SMILES,Hamster\nCC=O,true\n ,true\nO=C(N),true") }
dataset = Dataset.from_csv_file "#{DATA_DIR}/temp_test.csv"
- p dataset.warnings
- assert_equal "Cannot parse SMILES compound ' ' at position 3, all entries are ignored.", dataset.warnings.join
+ assert_equal "Cannot parse SMILES compound '' at position 3, all entries are ignored.", dataset.warnings.join
File.delete "#{DATA_DIR}/temp_test.csv"
dataset.features.each{|f| feature = Feature.find f.id; feature.delete}
dataset.delete