From b22490a787c96dfbe2107f59a1534c2f845b1cef Mon Sep 17 00:00:00 2001 From: martinahansen Date: Wed, 23 Nov 2011 13:50:50 +0000 Subject: [PATCH] removed stale unit tests from test_biopieces.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1681 74ccb610-7750-0410-82ae-013aeee3265d --- code_ruby/test/maasha/test_biopieces.rb | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/code_ruby/test/maasha/test_biopieces.rb b/code_ruby/test/maasha/test_biopieces.rb index 1851c5c..2dd2430 100755 --- a/code_ruby/test/maasha/test_biopieces.rb +++ b/code_ruby/test/maasha/test_biopieces.rb @@ -200,13 +200,6 @@ class BiopiecesTest < Test::Unit::TestCase assert_nothing_raised { Biopieces.options_parse(argv,[],SCRIPT_PATH) } end -# # FIXME This one fails because any argument to a flag is ignored and the flag value is set to true. Should it raise? -# test "Options.parse with type cast flag with and argument raises -# casts = [{:long=>"foo", :short=>"f", :type=>"flag", :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}] -# opt_parser = Options.new(casts) -# assert_raise(ArgumentError) { opt_parser.parse(["--foo", "bar"],SCRIPT_PATH) } -# end - def test_Biopieces_options_parse_with_stream_in_argv_returns_correct_options argv = ["--stream_in", DUMMY_FILE] options = Biopieces.options_parse(argv,[],SCRIPT_PATH) @@ -246,16 +239,6 @@ class BiopiecesTest < Test::Unit::TestCase assert_nothing_raised(ArgumentError) { Biopieces.options_parse(argv,casts,SCRIPT_PATH) } end -# # This one results in an error: "OptionParser::InvalidArgument: invalid argument: --foo bar" -# # So it appears that this is tested in OptionParser already. -# test "Options.parse with type cast int and non-int value raises" do -# ["bar" ].each do |val| # what about nil, false, true, [], {}, 0.1 ? -# casts = [{:long=>"foo", :short=>"f", :type=>"int", :mandatory=>false, :default=>nil, :allowed=>nil, :disallowed=>nil}] -# opt_parser = Options.new(casts) -# assert_raise(ArgumentError) { opt_parser.parse(["--foo", "#{val}"],SCRIPT_PATH) } -# end -# end - def test_Biopieces_options_parse_with_type_cast_int_dont_raise [0,-1,1,327649123746293746374276347824].each do |val| argv = ["--foo", "#{val}", "-I", DUMMY_FILE] @@ -264,8 +247,6 @@ class BiopiecesTest < Test::Unit::TestCase end end - # TODO similar test for uint as "test "Options.parse with type cast int and non-int value raises" do" - def test_Biopieces_options_parse_with_type_cast_uint_dont_raise [0,1,327649123746293746374276347824].each do |val| argv = ["--foo", "#{val}", "-I", DUMMY_FILE] -- 2.39.5