원클릭으로
pytest-patterns
Pytest best practices including fixtures, parametrize, markers, and assertion patterns for Python test suites.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Pytest best practices including fixtures, parametrize, markers, and assertion patterns for Python test suites.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Translate natural language image descriptions into detailed, structured DALL-E prompts with subject, style, composition, lighting, and mood specifications.
Decompose mathematical problems into sub-expressions, evaluate each one with the calculator tool, and present the full working chain. Handles arithmetic, trigonometry, logarithms, and financial formulas.
Compare two or more PDF documents by extracting targeted sections, building a structured comparison matrix, and highlighting differences with page references.
Extract structured data from web pages using browser snapshot and text tools, then process it into tables, comparisons, or summaries using Python.
Analyze endpoint latency trends using historical check data from memory. Detects slow degradation, spikes vs sustained issues, and calculates baseline deviations.
Validate API response structure and content. Detects schema drift, unexpected null values, and abnormal response sizes.
| name | pytest-patterns |
| description | Pytest best practices including fixtures, parametrize, markers, and assertion patterns for Python test suites. |
| requires | {"bins":["python"]} |
Pytest patterns and best practices for Python test suites.
Use this skill when the project has pyproject.toml, setup.cfg, pytest.ini,
conftest.py, or a tests/ directory containing *_test.py or test_*.py
files.
test_<module>.py to mirror the source module they cover.class TestParseConfig:) when they
share setup or conceptually belong together.test_<behavior_under_test> -- the name should read
like a specification (e.g. test_parse_config_raises_on_missing_key).conftest.py so they are automatically
discovered by pytest.function (default, one per test), class,
module, session.yield fixtures for setup/teardown -- code after yield runs as
cleanup even if the test fails.@pytest.fixture(params=[...])) run every
dependent test once per parameter value.@pytest.mark.parametrize("x,expected", [(1, 2), (3, 6)]) runs the
test once per tuple.@pytest.mark.parametrize decorators stack -- pytest generates
the cartesian product.indirect=True to route parameter values through a fixture before
they reach the test.@pytest.mark.slow -- tag long-running tests so they can be skipped with
pytest -m "not slow".@pytest.mark.skip(reason="...") -- unconditionally skip.@pytest.mark.xfail(reason="...") -- expect failure; test still runs but
does not fail the suite.pyproject.toml under [tool.pytest.ini_options]
to avoid warnings.pytest -m "marker_name".assert -- pytest rewrites it to show detailed diffs on failure.with pytest.raises(ValueError, match=r"expected .* pattern"): for
exception type and message verification.pytest.approx(0.1 + 0.2, abs=1e-9) for floating-point comparisons.match= on pytest.raises to verify the error message, not just the
exception type.pytest -v -- verbose output with one line per test.pytest -x -- fail fast, stop on first failure.pytest -k "pattern" -- run only tests whose name matches the pattern.pytest --tb=short -- shorter tracebacks for quick scanning.unittest.TestCase unless the project already uses it.tmp_path or tmp_path_factory.sleep() in tests -- use mocking or polling helpers.print() statements in committed tests -- use logging or
capsys if output matters.