summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-06-21 10:26:00 +0200
committerChristoph Helma <helma@in-silico.ch>2013-06-21 10:26:00 +0200
commitfb16161721f8fd5eec85cf18920dfd8e3fcd4471 (patch)
tree18f93906419c021a132e28ceee5f143ea18b3e77
parent5594665f9a3dd9e8af4d1e96a608d9f96662bac5 (diff)
opentox-client test split
-rw-r--r--opentox-client-all.rb (renamed from opentox-client.rb)1
-rw-r--r--opentox-client-short.rb14
-rw-r--r--test/dataset.rb4
-rw-r--r--test/lazar-extended.rb2
4 files changed, 17 insertions, 4 deletions
diff --git a/opentox-client.rb b/opentox-client-all.rb
index 3080f1c..e4dcec6 100644
--- a/opentox-client.rb
+++ b/opentox-client-all.rb
@@ -5,7 +5,6 @@ exclude = [
"test/setup.rb",
"test/descriptors.rb",
"test/lazar-pc-descriptors.rb",
- "test/validation-long.rb",
"test/lazarweb.rb",
"test/pc-lazar.rb",
] + Dir["test/toxbank*.rb"]
diff --git a/opentox-client-short.rb b/opentox-client-short.rb
new file mode 100644
index 0000000..982d373
--- /dev/null
+++ b/opentox-client-short.rb
@@ -0,0 +1,14 @@
+require 'minitest/autorun'
+require 'openbabel'
+all = Dir["test/*.rb"]
+exclude = [
+ "test/setup.rb",
+ "test/descriptors.rb",
+ "test/lazar-pc-descriptors.rb",
+ "test/lazar-extended.rb",
+ "test/validation-long.rb",
+ "test/dataset-large.rb",
+ "test/lazarweb.rb",
+ "test/pc-lazar.rb",
+] + Dir["test/toxbank*.rb"]
+(all - exclude).each {|f| require_relative f }
diff --git a/test/dataset.rb b/test/dataset.rb
index d81cdcd..da111b7 100644
--- a/test/dataset.rb
+++ b/test/dataset.rb
@@ -193,9 +193,9 @@ class DatasetTest < MiniTest::Test
assert_equal true, URI.accessible?(dataset.uri, SUBJECTID)
assert_equal "Cannot parse compound '' at position 3, all entries are ignored.", dataset[RDF::OT.Warnings]
File.delete "#{DATA_DIR}/temp_test.csv"
- dataset.features.each{|f| feature = OpenTox::Feature.find f.uri, @@subjectid; feature.delete}
+ dataset.features.each{|f| feature = OpenTox::Feature.find f.uri, SUBJECTID; feature.delete}
dataset.delete
- assert_equal false, URI.accessible?(dataset.uri, @@subjectid)
+ assert_equal false, URI.accessible?(dataset.uri, SUBJECTID)
end
end
diff --git a/test/lazar-extended.rb b/test/lazar-extended.rb
index 3da770c..4c1096b 100644
--- a/test/lazar-extended.rb
+++ b/test/lazar-extended.rb
@@ -41,7 +41,7 @@ class LazarExtendedTest < MiniTest::Test
feature_dataset_uri = model[RDF::OT.featureDataset]
feature_dataset = OpenTox::Dataset.new feature_dataset_uri , SUBJECTID
assert_equal dataset.compounds.size, feature_dataset.compounds.size
- assert_equal 51, feature_dataset.features.size
+ assert_equal 52, feature_dataset.features.size
assert_equal '[#17&A]-[#6&A]', OpenTox::Feature.new(feature_dataset.features.first.uri, SUBJECTID).title
compound = OpenTox::Compound.from_inchi("InChI=1S/C10H9NO2S/c1-8-2-4-9(5-3-8)13-6-10(12)11-7-14/h2-5H,6H2,1H3")
prediction_uri = model.run :compound_uri => compound.uri