mirror of
https://github.com/NCBM/plyngent.git
synced 2026-07-23 05:55:16 +08:00
core/tools+test: make process and path checks Windows-portable
Use sys.executable for process tests; normalize denylist/glob paths; skip readline when missing.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import importlib.util
|
||||
|
||||
import pytest
|
||||
import tomlkit
|
||||
|
||||
from plyngent.cli.readline_setup import (
|
||||
@@ -12,6 +15,11 @@ from plyngent.cli.state import ReplState
|
||||
from plyngent.config.models import ModelConfig, OpenAICompatibleProvider, OpenAIProvider
|
||||
from plyngent.config.store import ConfigStore
|
||||
|
||||
pytestmark = pytest.mark.skipif(
|
||||
importlib.util.find_spec("readline") is None,
|
||||
reason="readline not available (e.g. Windows/Wine)",
|
||||
)
|
||||
|
||||
|
||||
def _minimal_state(tmp_path: object) -> ReplState:
|
||||
from pathlib import Path
|
||||
|
||||
Reference in New Issue
Block a user