diff options
-rw-r--r-- | ewww.py | 17 |
1 files changed, 0 insertions, 17 deletions
@@ -16,23 +16,6 @@ import urllib.parse import yaml -# Run a subprocess, capture its output and exit code in context. -def _run(ctx, argv): - p = subprocess.Popen(argv, stdout=subprocess.PIPE, stderr=subprocess.PIPE) - stdout, stderr = p.communicate("") - ctx["argv"] = argv - ctx["stdout"] = stdout.decode("utf-8") - ctx["stderr"] = stderr.decode("utf-8") - ctx["exit"] = p.returncode - - -# Check that latest call of _run ended with an specific exit code. -def _run_exit(ctx, expected): - if ctx["exit"] != expected: - print("ctx:", ctx.as_dict()) - assert_eq(ctx["exit"], expected) - - # Name of Rust binary, debug-build. def _binary(name): return os.path.abspath(os.path.join(srcdir, "target", "debug", name)) |