(self, args, stdin="", cwd=None)
| 47 | self.fail("Unable to find Cactus") |
| 48 | |
| 49 | def run_cli(self, args, stdin="", cwd=None): |
| 50 | real_args = [self.find_cactus()] |
| 51 | real_args.extend(args) |
| 52 | |
| 53 | kwargs = { |
| 54 | "args": real_args, |
| 55 | "stdin": subprocess.PIPE, |
| 56 | "stdout": subprocess.PIPE, |
| 57 | "stderr": subprocess.PIPE, |
| 58 | } |
| 59 | |
| 60 | if cwd is not None: |
| 61 | kwargs["cwd"] = cwd |
| 62 | |
| 63 | p = subprocess.Popen(**kwargs) |
| 64 | out, err = p.communicate(stdin.encode("utf-8")) |
| 65 | return p.returncode, out.decode("utf-8"), err.decode("utf-8") |
| 66 | |
| 67 | def test_create_and_build(self): |
| 68 | self.assertEqual(0, len(os.listdir(self.test_dir))) |
no test coverage detected