Agent skill
testing-guidelines
Pytest testing patterns, fixtures, mocking, and coverage for GMailArchiver. Use when writing unit tests, integration tests, creating fixtures, mocking Gmail API, or checking coverage. Triggers on: test, pytest, fixture, mock, coverage, conftest, assert, unit test, integration test.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/testing/testing-guidelines
SKILL.md
Testing Guidelines for GMailArchiver
This skill provides guidance on testing practices and patterns.
Source Documentation
Always read the authoritative source:
docs/TESTING.md - The definitive testing guidelines document containing:
- Test organization and structure
- Naming conventions for tests
- Fixture patterns and usage
- Mocking strategies (especially for Gmail API)
- Coverage requirements and targets
- Integration vs unit test guidelines
- Test data management
Key Test Files
tests/conftest.py- Shared fixtures and configurationtests/test_*.py- Test modules (match source structure)
Test Commands
# Run all tests with coverage
uv run pytest
# Run specific test file
uv run pytest tests/test_module.py -v
# Run specific test function
uv run pytest tests/test_module.py::test_name -v
# Run without coverage (faster)
uv run pytest --no-cov
# Run with coverage report
uv run pytest --cov=src/gmailarchiver --cov-report=html
Coverage Requirements
- Overall: 95%+ coverage
- Core modules: Higher coverage expected
- See
docs/TESTING.mdfor specific targets
Usage
When writing tests:
- Read
docs/TESTING.mdfor current testing guidelines - Check
tests/conftest.pyfor available fixtures - Follow existing test patterns in similar test files
- If guidelines change, update
docs/TESTING.md(not this skill)
The source documentation is the single source of truth - this skill just points you there.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?