Skip to content

Commit 0b65b84

Browse files
test refinement: add wd_wrapper run timeout - default 10 seconds
1 parent b138bbd commit 0b65b84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

testing/wd_wrapper.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ def __init__(self, cwd: Path) -> None:
2020
self.cwd = cwd
2121
self.__counter = itertools.count()
2222

23-
def __call__(self, cmd: list[str] | str, **kw: object) -> str:
23+
def __call__(self, cmd: list[str] | str, *, timeout: int = 10, **kw: object) -> str:
2424
if kw:
2525
assert isinstance(cmd, str), "formatting the command requires text input"
2626
cmd = cmd.format(**kw)
2727
from setuptools_scm._run_cmd import run
2828

29-
return run(cmd, cwd=self.cwd).stdout
29+
return run(cmd, cwd=self.cwd, timeout=timeout).stdout
3030

3131
def write(self, name: str, content: str | bytes) -> Path:
3232
path = self.cwd / name

0 commit comments

Comments
 (0)