Skip to content

Commit

Permalink
pylint, black
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Aug 29, 2023
1 parent 48930f3 commit fbe0e1d
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions test-runner/wasi_test_runner/runtime_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ def __init__(self, adapter_path: str) -> None:

def get_version(self) -> RuntimeVersion:
output = (
subprocess.check_output([sys.executable, self._adapter_path, "--version"], encoding="UTF-8")
subprocess.check_output(
[sys.executable, self._adapter_path, "--version"], encoding="UTF-8"
)
.strip()
.split(" ")
)
Expand All @@ -42,20 +44,20 @@ def run_test(
+ [e for env in self._env_to_list(env_variables) for e in ("--env", env)]
)

p = subprocess.Popen(
with subprocess.Popen(
args,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
cwd=Path(test_path).parent,
)
try:
out, err = p.communicate(timeout=3)
except subprocess.TimeoutExpired:
p.terminate()
p.wait()
raise
return Output(p.returncode, out, err)
) as proc:
try:
out, err = proc.communicate(timeout=3)
except subprocess.TimeoutExpired:
proc.terminate()
proc.wait()
raise
return Output(proc.returncode, out, err)

@staticmethod
def _abs(path: str) -> str:
Expand Down

0 comments on commit fbe0e1d

Please sign in to comment.