Example #1
0
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
Example #2
0
 def test_invoke_non_exist_input(self):
     non_exist_input_cmd = ShellCommand("cat < {input}", input="non_exist_file")
     self.assertFalse(non_exist_input_cmd.invoke())
Example #3
0
 def test_invoke_non_exist_output(self):
     non_exist_output_cmd = ShellCommand("echo tempfile3", output="tempfile3")
     self.assertFalse(non_exist_output_cmd.invoke())
Example #4
0
 def test_invoke_collect_output(self):
     echo_cmd = ShellCommand("echo test_collect").set_stdout_collecting()
     self.assertTrue(echo_cmd.invoke())
     self.assertEqual(echo_cmd.result, "test_collect\n")
Example #5
0
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
Example #6
0
 def test_invoke_non_exist_output(self):
     non_exist_output_cmd = ShellCommand("echo tempfile3",
                                         output="tempfile3")
     self.assertFalse(non_exist_output_cmd.invoke())
Example #7
0
 def test_invoke_non_exist_input(self):
     non_exist_input_cmd = ShellCommand("cat < {input}",
                                        input="non_exist_file")
     self.assertFalse(non_exist_input_cmd.invoke())
Example #8
0
 def test_invoke_collect_output(self):
     echo_cmd = ShellCommand("echo test_collect").set_stdout_collecting()
     self.assertTrue(echo_cmd.invoke())
     self.assertEqual(echo_cmd.result, "test_collect\n")