Python Pytest Ops

pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.

223 stars 42 forksTesting & QA

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add NeverSight/learn-skills.dev --skill python-pytest-ops
Manual install
git clone --depth 1 https://github.com/NeverSight/learn-skills.dev.git /tmp/learn-skills.dev
mkdir -p ~/.claude/skills
cp -r /tmp/learn-skills.dev/data/skills-md/0xdarkmatter/claude-mods/python-pytest-ops ~/.claude/skills/python-pytest-ops

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Python pytest Patterns

Modern pytest patterns for effective testing.

## Basic Test Structure

```python
import pytest

def test_basic():
    """Simple assertion test."""
    assert 1 + 1 == 2

def test_with_description():
    """Descriptive name and docstring."""
    result = calculate_total([1, 2, 3])
    assert result == 6, "Sum should equal 6"
```

## Fixtures

```python
import pytest

@pytest.fixture
def sample_user():
    """Create test user."""
    return {"id": 1, "name": "Test User"}

@pytest.fixture
def db_connection():
    """Fixture with setup and teardown."""
    conn = create_connection()
    yield conn
    conn.close()

def test_user(sample_user):
    """Fixtures injected by name."""
    assert sample_user["name"] == "Test User"
```

### Fixture Scopes

```python
@pytest.fixture(scope="function")  # Default - per test
@pytest.fixture(scope="class")     # Per test class
@pytest.fixture(scope="module")    # Per test file
@pytest.fixture(scope="session")   # Entire test run
```

## Parametrize

```python
@pytest.mark.parametrize("input,expected", [
    (1, 2),
    (2, 4),
    (3, 6),
])
def test_double(input, expected):
    assert double(input) == expected

# Multiple parameters
@pytest.mark.parametrize("x", [1, 2])
@pytest.mark.parametrize("y", [10, 20])
def test_multiply(x, y):  # 4 test combinations
    assert x * y > 0
```

## Exception Testing
Read the full skill on GitHub

Details

Skill name
python-pytest-ops
Path
data/skills-md/0xdarkmatter/claude-mods/python-pytest-ops/SKILL.md
Repo updated
18 November 2026

FAQ

What does the Python Pytest Ops skill do?

pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.

How do I install the Python Pytest Ops skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add NeverSight/learn-skills.dev --skill python-pytest-ops. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Python Pytest Ops popular?

It lives in NeverSight/learn-skills.dev, which has 223 GitHub stars and 42 forks.

Related skills

Council

223

NeverSight/learn-skills.dev

Convene the Council of High Intelligence — multi-persona deliberation with historical thinkers for deeper analysis of complex problems.

Other42

Megaeth Developer

223

NeverSight/learn-skills.dev

End-to-end MegaETH development playbook (Feb 2026). Covers wallet operations, token swaps (Kyber Network), eth_sendRawTransactionSync (EIP-7966) for instant receipts, JSON-RPC batching, real-time mini-block subscriptions, storage-aware contract patterns (Solady RedBlackTreeLib), MegaEVM gas model, WebSocket keepalive, bridging from Ethereum, and debugging with mega-evme. Use when building on MegaETH, managing wallets, sending transactions, or deploying contracts.

Software Development42

Openclaw Stock Skill

223

NeverSight/learn-skills.dev

使用 data.diemeng.chat 提供的接口查询股票日线、分钟线、财务指标等数据,支持 A 股等市场。

Finance & Crypto42

Python Pytest Patterns

223

NeverSight/learn-skills.dev

pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.

Testing & QA42

Playwright Expert

121

theguysudo/ENZO

Use when writing E2E tests with Playwright, setting up test infrastructure, or debugging flaky browser tests. Invoke to write test scripts, create page objects, configure test fixtures, set up reporters, add CI integration, implement API mocking, or perform visual regression testing. Trigger terms: Playwright, E2E test, end-to-end, browser testing, automation, UI testing, visual testing, Page Object Model, test flakiness.

Testing & QA29

Test Master

121

theguysudo/ENZO

Generates test files, creates mocking strategies, analyzes code coverage, designs test architectures, and produces test plans and defect reports across functional, performance, and security testing disciplines. Use when writing unit tests, integration tests, or E2E tests; creating test strategies or automation frameworks; analyzing coverage gaps; performance testing with k6 or Artillery; security testing with OWASP methods; debugging flaky tests; or working on QA, regression, test automation, quality gates, shift-left testing, or test maintenance.

Testing & QA29

Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.