miso2233/sonettohere/unit-test

Claude Code and agent skill by miso2233/sonettohere

Trust tier 2
  • community
LLM review pending
Source check pending

Checking that the SKILL.md file is still in the repository.

执行 Python 单元测试文件(unittest 框架),返回通过/失败/错误统计和详细报告。适用于用户想运行测试、验证代码正确性、排查测试失败原因时。

Install

npx vskill@latest install miso2233/sonettohere/unit-test

SKILL.md

Unit Test

执行 Python 单元测试文件(unittest 框架),支持按测试类、测试方法粒度运行,返回详细的测试报告。

脚本位置

${SKILL_DIR}/scripts/run_tests.py

运行方式:

bash
uv run "${SKILL_DIR}/scripts/run_tests.py" --test-file PATH [--test-class CLASS] [--test-method METHOD]

使用方式

指定测试文件路径,可选指定测试类和方法:

  • 运行整个测试文件:--test-file tests/test_example.py
  • 运行特定测试类:--test-file tests/test_example.py --test-class TestExample
  • 运行特定测试方法:--test-file tests/test_example.py --test-class TestExample --test-method test_foo

参数

参数说明
--test-file PATH测试文件路径(必填)
--test-class CLASS特定测试类名(可选)
--test-method METHOD特定测试方法名(可选,需配合 --test-class)

执行流程

  1. 使用 importlib 动态加载测试模块
  2. 使用 unittest.TestLoader 按指定粒度加载测试用例
  3. 使用 unittest.TextTestRunner 执行测试
  4. 收集测试结果并生成报告

输出报告

json
{
"status": "ok",
"tests_run": 10,
"failures": 1,
"errors": 0,
"skipped": 1,
"successful": 8,
"success_rate": 90.0,
"failures_details": [
{
"test": "test_foo (test_example.TestExample)",
"message": "AssertionError: ...",
"traceback": "Traceback (most recent call last):\n ..."
}
]
}

退出码

  • 0 — 所有测试通过
  • 1 — 存在失败或错误的测试

注意事项

  • 仅支持 Python unittest 框架
  • 测试文件路径必须在项目目录内
  • 脚本零外部依赖,用 uv run 直接执行

Security

  • Security scanPassed, 100 of 100Pattern checks on the skill's files.
  • Model reviewNot runA model review is scheduled for the next rescan.

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/miso2233/sonettohere/unit-test/badge)](https://verified-skill.com/skills/miso2233/sonettohere/unit-test)

Something wrong with this skill or its page? Tell us.