[tests] Purge tests and start with a clean implementation of subprocess
Seems like subprocess and friends (Popen, communicate) are not so easy to mock cleanly. Therefore, start from scratch and carefully write test by test, until (at least) the old test coverage has been restored.
This commit is contained in:
parent
1c6122fc3f
commit
6dbe440cb5
23 changed files with 61 additions and 1240 deletions
|
@ -15,6 +15,8 @@ def execute(cmd, wait=True):
|
|||
out, _ = proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
raise RuntimeError("{} exited with {}".format(cmd, proc.returncode))
|
||||
if type(out) == str:
|
||||
return out
|
||||
return out.decode("utf-8")
|
||||
return None
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue