Example #1
0
 def test_special_chars(self):
     # Mostly just a test that pipes.quote is working properly.
     # The comnand special characters should pass right through.
     assert ("bsub -J 'job'\"'\"' nam[e]' -P 'pr{oj n}ame \escape' "
             "-q '`tick` $(param sub)' run {abc,def}" == build_command([
                 ['-J', "job' nam[e]"],
                 ['-P', 'pr{oj n}ame \\escape'],
                 ['-q', '`tick` $(param sub)'],
             ], 'run {abc,def}'))
Example #2
0
 def test_special_chars(self):
     # Mostly just a test that pipes.quote is working properly.
     # The comnand special characters should pass right through.
     assert (
         "bsub -J 'job'\"'\"' nam[e]' -P 'pr{oj n}ame \escape' "
         "-q '`tick` $(param sub)' run {abc,def}" ==
         build_command([
             ['-J', "job' nam[e]"],
             ['-P', 'pr{oj n}ame \\escape'],
             ['-q', '`tick` $(param sub)'],
         ], 'run {abc,def}'))
Example #3
0
 def test_spaces(self, flags_spaces):
     assert ("bsub -J 'job name' -P 'proj name' "
             "-q 'queue with spaces' "
             "'command with spaces' 'arg with spaces'" ==
             build_command(
                 flags_spaces, "'command with spaces' 'arg with spaces'"))
Example #4
0
 def test_ptile(self, flags_ptile):
     assert ("bsub -R 'span[ptile=10]' command --flag flag_arg" ==
             build_command(flags_ptile, 'command --flag flag_arg'))
Example #5
0
 def test_simple(self, flags_simple):
     assert ('bsub -J awesomename -P awesomeproj -n 10 command arg1 arg2' ==
             build_command(flags_simple, 'command arg1 arg2'))
Example #6
0
 def test_spaces(self, flags_spaces):
     assert ("bsub -J 'job name' -P 'proj name' "
             "-q 'queue with spaces' "
             "'command with spaces' 'arg with spaces'" == build_command(
                 flags_spaces, "'command with spaces' 'arg with spaces'"))
Example #7
0
 def test_ptile(self, flags_ptile):
     assert ("bsub -R 'span[ptile=10]' command --flag flag_arg" ==
             build_command(flags_ptile, 'command --flag flag_arg'))
Example #8
0
 def test_simple(self, flags_simple):
     assert ('bsub -J awesomename -P awesomeproj -n 10 command arg1 arg2' ==
             build_command(flags_simple, 'command arg1 arg2'))