Beispiel #1
0
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
Beispiel #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())
Beispiel #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())
Beispiel #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")
Beispiel #5
0
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
Beispiel #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())
Beispiel #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())
Beispiel #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")