コード例 #1
0
ファイル: shell_command.py プロジェクト: asntech/GCAP
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
コード例 #2
0
ファイル: shell_command.py プロジェクト: asntech/GCAP
 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())
コード例 #3
0
ファイル: shell_command.py プロジェクト: asntech/GCAP
 def test_invoke_non_exist_output(self):
     non_exist_output_cmd = ShellCommand("echo tempfile3", output="tempfile3")
     self.assertFalse(non_exist_output_cmd.invoke())
コード例 #4
0
ファイル: shell_command.py プロジェクト: asntech/GCAP
 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")
コード例 #5
0
ファイル: shell_command.py プロジェクト: qinqian/GCAP
 def test_invoke_dangling_tool(self):
     dangling_tool_command = ShellCommand("{tool} fun", tool="wolfyp")
     self.assertFalse(dangling_tool_command.invoke())
コード例 #6
0
ファイル: shell_command.py プロジェクト: qinqian/GCAP
 def test_invoke_non_exist_output(self):
     non_exist_output_cmd = ShellCommand("echo tempfile3",
                                         output="tempfile3")
     self.assertFalse(non_exist_output_cmd.invoke())
コード例 #7
0
ファイル: shell_command.py プロジェクト: qinqian/GCAP
 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())
コード例 #8
0
ファイル: shell_command.py プロジェクト: qinqian/GCAP
 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")