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", "")