feat(client): initialize procurement tool skeleton

This commit is contained in:
QiuSW
2026-08-03 18:32:00 +08:00
parent 2ab5baa776
commit bcec012c8b
18 changed files with 516 additions and 31 deletions
+25
View File
@@ -0,0 +1,25 @@
"""验证本地运行目录策略,不需要连接设备。"""
from __future__ import annotations
import sys
from pathlib import Path
import tempfile
import unittest
CLIENT_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(CLIENT_ROOT / "src"))
from cmbuyer_client.runtime import RuntimePaths
class RuntimePathsTests(unittest.TestCase):
def test_ensure_exists_creates_only_runtime_directories(self) -> None:
with tempfile.TemporaryDirectory() as directory:
paths = RuntimePaths.from_root(Path(directory) / "runtime")
paths.ensure_exists()
self.assertTrue(paths.logs.is_dir())
self.assertTrue(paths.artifacts.is_dir())