예제 #1
0
    def test_runexe(self):
        with self.assertRaises(FileExistsException):
            runExe("/no_exist.exe", "")

        out = runExe("/bin/echo", "output")
        self.assertEqual(out, "output\n")

        out = runExe("/bin/echo", ["output"])
        self.assertEqual(out, "output\n")

        with self.assertRaises(BadExecutableException):
            runExe("false", "")
예제 #2
0
    def test_runexe(self):
        with self.assertRaises(FileExistsException):
            runExe("/no_exist.exe", "")

        out = runExe("/bin/echo", "output")
        self.assertEqual(out, "output\n")

        out = runExe("/bin/echo", ["output"])
        self.assertEqual(out, "output\n")

        with self.assertRaises(BadExecutableException):
            runExe("false", "")