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
+24
View File
@@ -0,0 +1,24 @@
"""验证桌面入口的纯参数处理,不启动 PySide6。"""
from __future__ import annotations
import sys
from pathlib import Path
import unittest
from unittest import mock
CLIENT_ROOT = Path(__file__).resolve().parents[1]
sys.path.insert(0, str(CLIENT_ROOT / "src"))
from cmbuyer_client.app import select_application_argv
class ApplicationArgumentsTests(unittest.TestCase):
def test_empty_argument_list_is_not_replaced_with_process_arguments(self) -> None:
with mock.patch("cmbuyer_client.app.sys.argv", ["process-name", "--process-option"]):
self.assertEqual([], select_application_argv([]))
def test_none_uses_process_arguments(self) -> None:
with mock.patch("cmbuyer_client.app.sys.argv", ["process-name", "--process-option"]):
self.assertEqual(["process-name", "--process-option"], select_application_argv(None))