π¦ ClawHub
Nm Parseltongue Python Testing
by @athola
Python testing patterns with pytest, fixtures, TDD, mocking, async and integration tests
TERMINAL
clawhub install nm-parseltongue-python-testingπ About This Skill
name: python-testing description: | Python testing patterns: pytest setup, fixtures, TDD, mocking, async tests, and integration tests version: 1.9.4 triggers: - python - testing - pytest - tdd - test-automation - quality-assurance metadata: {"openclaw": {"homepage": "https://github.com/athola/claude-night-market/tree/master/plugins/parseltongue", "emoji": "\ud83e\uddea"}} source: claude-night-market source_plugin: parseltongue
> Night Market Skill β ported from claude-night-market/parseltongue. For the full experience with agents, hooks, and commands, install the Claude Code plugin.
Python Testing Hub
Testing standards for pytest configuration, fixture management, and TDD implementation.
Table of Contents
1. Quick Start 2. When to Use 3. Modules
Quick Start
1. Dependencies: pip install pytest pytest-cov pytest-asyncio pytest-mock
2. Configuration: Add the following to pyproject.toml:
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=src"
3. Verification: Run pytest to confirm discovery of files matching test_*.py.When To Use
pytest-mock or custom monkeypatching.pytest-asyncio markers and event loop management.When NOT To Use
Modules
This skill uses modular loading to manage the system prompt budget.
Core Implementation
modules/unit-testing.md - AAA (Arrange-Act-Assert) pattern, basic test structure, and exception validation.modules/fixtures-and-mocking.md - Request-scoped fixtures, parameterization, and boundary mocking.modules/async-testing.md - Coroutine testing, async fixtures, and concurrency validation.Infrastructure & Workflow
modules/test-infrastructure.md - Directory standards, conftest.py management, and coverage tools.modules/testing-workflows.md - Local execution patterns and GitHub Actions integration.Standards
modules/test-quality.md - Identification of common anti-patterns like broad exception catching or shared state between tests.Exit Criteria
Troubleshooting
test_*.py pattern. Use pytest --collect-only to debug discovery paths.pip install -e ..pytest-asyncio is installed and that async tests use the @pytest.mark.asyncio decorator or corresponding auto-mode configuration.β‘ When to Use
π‘ Examples
1. Dependencies: pip install pytest pytest-cov pytest-asyncio pytest-mock
2. Configuration: Add the following to pyproject.toml:
[tool.pytest.ini_options]
testpaths = ["tests"]
addopts = "--cov=src"
3. Verification: Run pytest to confirm discovery of files matching test_*.py.π Tips & Best Practices
test_*.py pattern. Use pytest --collect-only to debug discovery paths.pip install -e ..pytest-asyncio is installed and that async tests use the @pytest.mark.asyncio decorator or corresponding auto-mode configuration.