mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-09 08:21:50 +00:00
test: skip curses tests on Windows where _curses is unavailable (#40611)
Salvaged from #40447; re-verified on main, tightened, tested. Co-authored-by: Ganesh0690 <Ganesh0690@users.noreply.github.com>
This commit is contained in:
parent
628780b4f3
commit
6bdc4c0231
2 changed files with 14 additions and 0 deletions
|
|
@ -7,6 +7,13 @@ used to treat the leading ``27`` as ESC/cancel, which dumped the setup wizard's
|
|||
provider/model picker into its numbered "Select [1-N]" fallback the instant a
|
||||
user pressed up or down.
|
||||
"""
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
# curses (and its _curses C extension) is Unix-only; skip the whole module on Windows.
|
||||
if sys.platform == "win32":
|
||||
pytest.skip("curses is not available on Windows", allow_module_level=True)
|
||||
import curses
|
||||
|
||||
from hermes_cli.curses_ui import (
|
||||
|
|
|
|||
|
|
@ -8,6 +8,13 @@ The bug was ``curses.init_pair(4, 8, -1)`` using raw color 8 ("bright
|
|||
black" / dim gray) which does not exist on 8-color terminals. The fix
|
||||
clamps with ``min(8, curses.COLORS - 1)``.
|
||||
"""
|
||||
import sys
|
||||
|
||||
import pytest
|
||||
|
||||
# curses (and its _curses C extension) is Unix-only; skip the whole module on Windows.
|
||||
if sys.platform == "win32":
|
||||
pytest.skip("curses is not available on Windows", allow_module_level=True)
|
||||
|
||||
import curses
|
||||
import re
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue