Files
skill-template/tests/integration/test_simulator_rpa_contract.py.sample
chendelian 4a0be93b4a
All checks were successful
技能自动化发布 / release (push) Successful in 5s
chore: auto release commit (2026-07-03 12:09:55)
2026-07-03 12:09:55 +08:00

42 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""
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
_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
@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__":
unittest.main()