Skip to main content
skill CX Codex

pytest-patterns — Claude Code skill: what it does, how to install

Python testing guide for pytest. Helps coding assistants generate clean fixtures, manage test lifecycles, and handle test parametrization.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add manutej/luxor-claude-marketplace --skill pytest-patterns -a claude-code
Open on GitHub

What pytest-patterns does

This skill guides AI assistants on structuring Python test suites with pytest. It establishes discovery rules across test_*.py files and plain functions, replacing boilerplate unittest.TestCase classes with clear assert expressions.

It details fixture design patterns across all lifecycle scopes, from isolated test functions to session-level database setups. The guidance covers teardown steps via yield and factory functions that yield mock models. It also introduces parametrization techniques using marks and labeled inputs for edge case coverage.

A test class defining __init__ breaks default pytest discovery. The skill ensures the assistant avoids such mistakes when scaffolding test files.

What it helps with

  • Configure hierarchical fixtures with teardown via yield
  • Parametrize test functions across multiple input combinations
  • Migrate legacy unittest suites to idiomatic pytest assertions
  • Implement factory fixtures to generate mock domain entities

Example prompts for the agent

  • Create a session-scoped database fixture with automatic cleanup
  • Parametrize this test function to cover edge cases and invalid inputs
  • Refactor this unittest test suite into clean pytest conventions

How to install pytest-patterns

1Skills CLI (Vercel)

npx skills add manutej/luxor-claude-marketplace --skill pytest-patterns -a claude-code

2Manually: put the files in place

~/.claude/skills/pytest-patterns/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/pytest-patterns/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about pytest-patterns

How to install pytest-patterns in Claude Code?

Run npx skills add manutej/luxor-claude-marketplace --skill pytest-patterns -a claude-code. This installs the skill file into your local Claude environment.

What does pytest-patterns do?

It instructs your AI assistant on standard Python testing patterns. It provides clear rules for fixtures, parametrization, and test suite organization.

Which fixture scopes does the guide cover?

It covers function, class, module, package, and session scopes. These tiers control how frequently setup and teardown routines run during a suite execution.

Similar skills

All skills for Testing and QA →

From the same set59

postgresql-database-engineering Guides database design, index selection, and query optimization in PostgreSQL. Useful when tuning slow queries, setting up table partitioning, or configuring replication. CX Codex +1 1,800installs golang-backend-development Supplies your assistant with battle-tested Go architectural guidelines covering goroutines, channels, mutexes, and request cancellation. CX Codex +1 1,400installs playwright-visual-testing Use Playwright MCP to inspect web pages, capture screenshots, and exercise user flows. Handy for checking UI changes and responsive layouts. CX Codex +1 1,400installs jest-react-testing A skill for testing React components and hooks with Jest and React Testing Library: config, mocks, async patterns. CX Codex +1 1,200installs ui-design-patterns A reference on common interface patterns: navigation, forms, data display, feedback and accessibility. Useful when you design components or audit an existing UI. CX Codex +1 853installs ux-principles Gives your coding agent usability heuristics, user research methods and accessibility checks, so interface work follows known rules instead of guesswork. CX Codex +1 836installs frontend-architecture A skill for planning frontend structure: layers, patterns, state management and module boundaries. Useful once an app outgrows a flat folder of components. CX Codex +1 722installs axum-web-framework Guides coding assistants through building Rust web services with Axum. It covers routing, extractors, Tower middleware, and state handling. CX Codex +1 649installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor