test/tools: cover workspace, file, run_command and PTY

This commit is contained in:
2026-07-14 18:20:32 +08:00
parent f23780171b
commit f45af76c9b
6 changed files with 212 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
from __future__ import annotations
from typing import TYPE_CHECKING
import pytest
from plyngent.tools.workspace import clear_workspace_root, set_workspace_root
if TYPE_CHECKING:
from collections.abc import Iterator
from pathlib import Path
@pytest.fixture
def workspace(tmp_path: Path) -> Iterator[Path]:
clear_workspace_root()
root = set_workspace_root(tmp_path)
yield root
clear_workspace_root()