chore: auto release commit (2026-07-03 12:09:55)
All checks were successful
技能自动化发布 / release (push) Successful in 5s
All checks were successful
技能自动化发布 / release (push) Successful in 5s
This commit is contained in:
@@ -1,20 +1,40 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# 样例:复制为 test_simulator_rpa_contract.py 后按需运行;默认跳过。
|
||||
"""仿真页面 / RPA 契约(不默认启动浏览器)。"""
|
||||
"""
|
||||
Amazon 仿真 Reports RPA 联调契约样例(不进入默认 unittest 套件)。
|
||||
|
||||
用法(需账号 + 浏览器 + OPENCLAW_TEST_TARGET=simulator_rpa):
|
||||
copy tests\\integration\\test_simulator_rpa_contract.py.sample \\
|
||||
tests\\integration\\test_simulator_rpa_contract.py
|
||||
set OPENCLAW_TEST_TARGET=simulator_rpa
|
||||
python tests\\integration\\test_simulator_rpa_contract.py
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
from adapter_test_utils import should_skip_profile
|
||||
_TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
|
||||
_SKILL_ROOT = os.path.abspath(os.path.join(_TESTS_DIR, "..", ".."))
|
||||
_SCRIPTS = os.path.join(_SKILL_ROOT, "scripts")
|
||||
for _p in (_SCRIPTS, _TESTS_DIR):
|
||||
if _p not in sys.path:
|
||||
sys.path.insert(0, _p)
|
||||
|
||||
from jiangchang_skill_core import config # noqa: E402
|
||||
|
||||
from service.task_service import cmd_run # noqa: E402
|
||||
|
||||
|
||||
class TestSimulatorRpaContractSample(unittest.TestCase):
|
||||
def test_skip_unless_simulator_rpa_target(self) -> None:
|
||||
skip, reason = should_skip_profile("simulator_rpa")
|
||||
if skip:
|
||||
raise unittest.SkipTest(reason)
|
||||
# 真实技能中:可替换为 Playwright 连接 http://localhost:5180/select 等仿真入口。
|
||||
self.assertFalse(skip)
|
||||
@unittest.skipUnless(
|
||||
os.environ.get("OPENCLAW_TEST_TARGET") == "simulator_rpa",
|
||||
"requires OPENCLAW_TEST_TARGET=simulator_rpa",
|
||||
)
|
||||
class TestSimulatorRpaContract(unittest.TestCase):
|
||||
def test_run_downloads_settlement_xlsx(self) -> None:
|
||||
config.reset_cache()
|
||||
rc = cmd_run(date_from="2025-12-01", date_to="2025-12-31")
|
||||
self.assertEqual(rc, 0)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user