summaryrefslogtreecommitdiff
path: root/tests/execute
diff options
context:
space:
mode:
authorBernát Gábor <bgabor8@bloomberg.net>2021-01-04 09:49:49 +0000
committerBernát Gábor <bgabor8@bloomberg.net>2021-01-04 09:56:36 +0000
commitf91a685d1bfc057634c5fd62c225a976706e552f (patch)
treeab0bc6e5f8b269283371908cbc0fef53751dfc4a /tests/execute
parent49e796ab200e2c259f5bebeb426d06e7595d5cd7 (diff)
downloadtox-git-f91a685d1bfc057634c5fd62c225a976706e552f.tar.gz
Allow running it on termux
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
Diffstat (limited to 'tests/execute')
-rw-r--r--tests/execute/local_subprocess/test_local_subprocess.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/execute/local_subprocess/test_local_subprocess.py b/tests/execute/local_subprocess/test_local_subprocess.py
index 501947e0..0a0a30ea 100644
--- a/tests/execute/local_subprocess/test_local_subprocess.py
+++ b/tests/execute/local_subprocess/test_local_subprocess.py
@@ -10,6 +10,7 @@ from typing import Dict, List, Tuple
import psutil
import pytest
from colorama import Fore
+from psutil import AccessDenied
from pytest_mock import MockerFixture
from tox.execute.api import Outcome
@@ -213,7 +214,10 @@ def test_command_keyboard_interrupt(tmp_path: Path, monkeypatch: MonkeyPatch, ca
while not process_up_signal.exists():
assert process.poll() is None
root = process.pid
- child = next(iter(psutil.Process(pid=root).children())).pid
+ try:
+ child = next(iter(psutil.Process(pid=root).children())).pid
+ except AccessDenied as exc: # pragma: no cover # on termux for example
+ pytest.skip(str(exc)) # pragma: no cover
print(f"test running in {os.getpid()} and sending CTRL+C to {process.pid}", file=sys.stderr)
process.send_signal(SIG_INTERRUPT)