Hike `testdir.spawn()` timeout on non-linux in CI

ns_aware
Gud Boi 2026-03-03 20:55:57 -05:00
parent 79396b4a26
commit 712c009790
1 changed files with 9 additions and 2 deletions

View File

@ -3,8 +3,9 @@
'''
from __future__ import annotations
import time
import platform
import signal
import time
from typing import (
Callable,
TYPE_CHECKING,
@ -33,6 +34,9 @@ if TYPE_CHECKING:
from pexpect import pty_spawn
_non_linux: bool = platform.system() != 'Linux'
def pytest_configure(config):
# register custom marks to avoid warnings see,
# https://docs.pytest.org/en/stable/how-to/writing_plugins.html#registering-custom-markers
@ -94,7 +98,10 @@ def spawn(
cmd,
**mkcmd_kwargs,
),
expect_timeout=3,
expect_timeout=(
6 if _non_linux and _ci_env
else 3
),
# preexec_fn=unset_colors,
# ^TODO? get `pytest` core to expose underlying
# `pexpect.spawn()` stuff?