AgentSkillsCN

run-tests

使用正确的 pytest 标志运行 Prompture 的测试套件。支持仅运行单元测试、执行集成测试、针对单个文件或单个测试、启用详细输出,以及跳过凭证验证等多种模式。当需要运行或调试测试时,可调用此技能。

SKILL.md
--- frontmatter
name: run-tests
description: Run Prompture's test suite with the correct pytest flags. Supports unit-only, integration, single file, single test, verbose, and credential-skip modes. Use when running or debugging tests.
metadata:
  author: prompture
  version: "1.0"

Run Tests

Commands

IntentCommand
All unit testspytest tests/ -x -q
Include integration testspytest tests/ --run-integration -x -q
Specific filepytest tests/{file}.py -x -q
Specific classpytest tests/{file}.py::{Class} -x -q
Specific testpytest tests/{file}.py::{Class}::{test} -x -q
Verbose outputReplace -q with -v
Show print outputAdd -s
Pattern matchAdd -k "pattern"
Skip missing credentialsTEST_SKIP_NO_CREDENTIALS=true pytest tests/ --run-integration -x -q
Legacy runnerpython test.py

Flags

  • -x stop on first failure
  • -q quiet (dots + summary)
  • -v verbose (each test name)
  • -s show stdout/stderr
  • --run-integration include @pytest.mark.integration tests

After Running

  • Pass: report count (e.g. "137 passed, 1 skipped")
  • Fail: read the failure output, identify root cause, fix it
  • Always run after modifying any file under prompture/