Testing quality standards

From athola/claude-night-market · View interactive version

Testing quality standards is an AI agent skill from the GitHub repository athola/claude-night-market. Defines test quality metrics, coverage thresholds, anti-patterns, and pytest config. Use when setting test gates, a suite's coverage target, or pytest fixtures.

How to use this skill

Skill file

Testing Quality Standards

Shared quality standards and metrics for testing across all plugins in the Claude Night Market ecosystem.

When To Use

When NOT To Use

Coverage Thresholds

| Level | Coverage | Use Case |

|-------|----------|----------|

| Minimum | 60% | Legacy code |

| Standard | 80% | Normal development |

| High | 90% | Critical systems |

| detailed | 95%+ | Safety-critical |

Quality Metrics

Structure

Coverage

Maintainability

Reliability

Detailed Topics

For implementation patterns and examples:

auditing a Python plugin's pytest and coverage configuration

conftest.py fixtures and test markers

test needs a throwaway git repository

TodoWrite, or other Claude Code tools

into GitHub Actions

Integration with Plugin Testing

This skill provides foundational standards referenced by:

Reference in your skill's frontmatter:

dependencies: [leyline:testing-quality-standards]

Verification: Run pytest -v to verify tests pass.

Troubleshooting

Common Issues

Tests not discovered

Ensure test files match pattern test_*.py or *_test.py. Run pytest --collect-only to verify.

Import errors

Check that the module being tested is in PYTHONPATH or install with pip install -e .

Async tests failing

Install pytest-asyncio and decorate test functions with @pytest.mark.asyncio

Exit Criteria

legacy code, 80% for normal development, 90% for critical

systems, 95%+ for safety-critical; measured with

pytest --cov and threshold enforced in pyproject.toml

organization, meaningful names, setup/teardown, isolation),

Coverage (critical paths, edge cases, error conditions,

integration points), Maintainability (DRY fixtures, clear

assertions, minimal mocking), Reliability (no flaky tests,

deterministic execution, no order dependencies)

confirmed by pytest --collect-only returning no errors

maps, timestamps, UUIDs); any found flagged as anti-patterns

per modules/anti-patterns.md

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.