diff options
author | Christoph Helma <helma@in-silico.ch> | 2010-07-20 11:25:37 +0200 |
---|---|---|
committer | Christoph Helma <helma@in-silico.ch> | 2010-07-20 11:25:37 +0200 |
commit | d5378ac285f200a9a75b52030856c77f4697325f (patch) | |
tree | c365a9596588e78bd88bb0bbdd7236b16d73f583 /test | |
parent | 59a4c9fba3ca77d9901dad2457fe1c5618a099ca (diff) |
@@config -> CONFIG
Diffstat (limited to 'test')
-rw-r--r-- | test/test_examples.rb | 28 | ||||
-rw-r--r-- | test/test_examples_util.rb | 8 |
2 files changed, 18 insertions, 18 deletions
diff --git a/test/test_examples.rb b/test/test_examples.rb index beeaa30..ae4f617 100644 --- a/test/test_examples.rb +++ b/test/test_examples.rb @@ -20,15 +20,15 @@ module ValidationExamples class LazarHamsterSplit < HamsterSplit def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end class MajorityHamsterSplit < HamsterSplit def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end @@ -46,15 +46,15 @@ module ValidationExamples class MajorityHamsterTrainingTest < HamsterTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarHamsterTrainingTest < HamsterTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -71,15 +71,15 @@ module ValidationExamples class MajorityHamsterCrossvalidation < HamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarHamsterCrossvalidation < HamsterCrossvalidation def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -95,15 +95,15 @@ module ValidationExamples class MajorityISTHamsterCrossvalidation < ISTHamsterCrossvalidationInsilico def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/class/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/class/algorithm") super end end class LazarISTHamsterCrossvalidation < ISTHamsterCrossvalidationInsilico def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-algorithm"],"lazar") - @algorithm_params = "feature_generation_uri="+File.join(@@config[:services]["opentox-algorithm"],"fminer") + @algorithm_uri = File.join(CONFIG[:services]["opentox-algorithm"],"lazar") + @algorithm_params = "feature_generation_uri="+File.join(CONFIG[:services]["opentox-algorithm"],"fminer") super end end @@ -160,7 +160,7 @@ module ValidationExamples class MajorityCacoTrainingTest < CacoTrainingTest def initialize - @algorithm_uri = File.join(@@config[:services]["opentox-majority"],"/regr/algorithm") + @algorithm_uri = File.join(CONFIG[:services]["opentox-majority"],"/regr/algorithm") super end end @@ -212,4 +212,4 @@ module ValidationExamples end #puts ValidationExamples.list -#puts ValidationExamples.select("1,2a").inspect
\ No newline at end of file +#puts ValidationExamples.select("1,2a").inspect diff --git a/test/test_examples_util.rb b/test/test_examples_util.rb index 582b814..3d4d605 100644 --- a/test/test_examples_util.rb +++ b/test/test_examples_util.rb @@ -5,7 +5,7 @@ module ValidationExamples @@dataset_uris = {} - def self.upload_dataset(file, dataset_service=@@config[:services]["opentox-dataset"], file_type="application/x-yaml") + def self.upload_dataset(file, dataset_service=CONFIG[:services]["opentox-dataset"], file_type="application/x-yaml") raise "File not found: "+file.path.to_s unless File.exist?(file.path) if @@dataset_uris[file.path.to_s]==nil data = File.read(file.path) @@ -40,7 +40,7 @@ module ValidationExamples $test_case.post uri,params return wait($test_case.last_response.body) else - return OpenTox::RestClientWrapper.post(File.join(@@config[:services]["opentox-validation"],uri),params) + return OpenTox::RestClientWrapper.post(File.join(CONFIG[:services]["opentox-validation"],uri),params) end end @@ -50,7 +50,7 @@ module ValidationExamples $test_case.get uri,nil,'HTTP_ACCEPT' => accept_header return wait($test_case.last_response.body) else - return OpenTox::RestClientWrapper.get(File.join(@@config[:services]["opentox-validation"],uri),{:accept => accept_header}) + return OpenTox::RestClientWrapper.get(File.join(CONFIG[:services]["opentox-validation"],uri),{:accept => accept_header}) end end @@ -291,4 +291,4 @@ module ValidationExamples "crossvalidation" end end -end
\ No newline at end of file +end |