pytest
Best practices for writing and organizing tests with pytest including fixtures, parametrize, and plugins.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Best practices for writing and organizing tests with pytest including fixtures, parametrize, and plugins.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Make one small, incremental code improvement to reduce codebase entropy. Use this skill whenever the user wants to nudge the codebase toward better shape, asks for a tiny refactor, says "nudge", or wants a low-risk cleanup pass — even if they don't describe a specific change.
Generate an end-to-end acceptance checklist by diffing the current codebase against the last released version. Compiles every user-facing and behavioral change into a structured, step-by-step verification manual. Use this skill whenever the user mentions "preflight", "acceptance testing", "acceptance manual", "release checklist", "verification checklist", "what changed since last release", or wants to validate readiness before shipping a new version. Also trigger when the user asks to review changes between versions or prepare QA steps.
Execute the glm-plan-usage release process. Use this skill when the user wants to publish a new version, create a release, bump version numbers, or says things like "release v0.2.0", "publish a new version", "cut a release", "ship it", or "prepare release". Also use when the user mentions CHANGELOG updates combined with version bumping in this Rust + NPM project.
| name | pytest |
| description | Best practices for writing and organizing tests with pytest including fixtures, parametrize, and plugins. |
Best practices for writing and organizing tests with pytest including fixtures, parametrize, and plugins.
Apply this skill when writing and organizing tests with pytest — fixtures, parametrize, markers, plugins, and test structure.
tests/ directory mirroring the source structure.test_<module>.py and test functions test_<behavior>().function > class > module > session).conftest.py for shared fixtures; put it at the appropriate directory level.yield fixtures for setup/teardown; prefer tmp_path over tempfile.@pytest.mark.parametrize for data-driven tests with multiple inputs.ids=...) for readable test output.parametrize with fixtures for cross-product testing.assert statements — pytest rewrites them for clear failure messages.pytest.raises(ExceptionType, match=...) for exception testing.pytest.approx() for floating-point comparisons.pytest-cov, pytest-mock, pytest-asyncio, pytest-xdist, pytest-timeout.pytest-mock's mocker fixture over raw unittest.mock.patch.session-scoped fixtures for mutable state.