Pytest Testing
Structured pytest guide covering TDD, fixtures, mocking, and coverage gating for CI/CD pipelines.
- CCM score
- 37 of 100
- skills.sh installs
- 589
- GitHub stars
- 7
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers pytest basics, fixtures and setup, mocking with unittest.mock, and coverage with CI/CD integration
- Includes code examples for parametrized tests,
conftest.pyfixtures,patch-based API client tests, and a GitHub Actions workflow - Sets an
--cov-fail-under=80threshold inpytest.iniso builds fail when coverage drops below 80 percent - Designed for Python developers who want a guided path through TDD with three hands-on projects
Install
$ npx -y skills add pluginagentmarketplace/custom-plugin-python --skill 'Pytest Testing' -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
Pytest Testing
Overview
Master software testing with pytest, Python's most popular testing framework. Learn test-driven development (TDD), write maintainable tests, and ensure code quality through comprehensive testing strategies.
Learning Objectives
- Write unit, integration, and functional tests with pytest
- Use fixtures for test setup and teardown
- Mock external dependencies effectively
- Implement test-driven development (TDD)
- Measure and improve code coverage
- Integrate tests with CI/CD pipelines
Core Topics
1. Pytest Basics
- Test discovery and naming conventions
- Assertions and comparison
- Test organization (files, classes, modules)
- Running tests (command-line options)
- Markers and test selection
- Parametrized tests
Code Example:
# test_calculator.py
import pytest
def add(a, b):
return a + b
def divide(a, b):
if b == 0:
raise ValueError("Cannot divide by zero")
return a / b
# Basic test
def test_add():
assert add(2, 3) == 5
assert add(-1, 1) == 0
assert add(0, 0) == 0
Details
- Repository
- github.com/pluginagentmarketplace/custom-plugin-python
- Categories
- Testing & QA, Python
- First seen
- Jun 3, 2026
Questions
What does the Pytest Testing skill help me do?
The Pytest Testing skill teaches test-driven development with pytest, covering fixtures, mocking and CI/CD integration. It walks through writing unit, integration and functional tests and measuring code coverage.
How do I install the Pytest Testing skill?
Run npx -y skills add pluginagentmarketplace/custom-plugin-python --skill 'Pytest Testing' -y in a project. Once installed, the agent can write pytest tests, set up fixtures and mock external dependencies.
Which other skills sit in the same category?
Pytest Testing is in the Testing and QA category on Claude Marketplaces, alongside tdd, test-driven-development, webapp-testing, migrate-to-shoehorn and break-ui. It focuses specifically on pytest for Python code.
Does the skill cover mocking and CI integration?
Yes, the skill covers unittest.mock basics, patching objects and side effects. It also shows measuring coverage with pytest-cov and wiring tests into GitHub Actions and GitLab CI.
More from pluginagentmarketplace/custom-plugin-python
All 3Similar to Pytest Testing
More Testing & QAaccessibility-testingaj-geddes/useful-ai-prompts584 installsTest web applications for WCAG compliance and ensure usability for users with disabilities. Use for accessibility test, a11y, axe, ARIA, keyboard navigation, sc
triageshiplightai/agent-skills584 installstriage
qa-executionpedronauck/skills580 installsRuns real-user dogfooding sessions through the product's public interfaces: a persona walks a journey in the browser, takes a thematic tour, probes edges, hunts
design-qaplugin87/ux-ui-agent-skills579 installsSet up or run design QA gates — token + hardcoded-value lint, automated a11y (axe), contrast, visual regression across variants/states/themes/RTL, and the manua
playwright-skilllambdatest/agent-skills576 installsGenerates production-grade Playwright automation scripts and E2E tests in TypeScript, JavaScript, Python, Java, or C#. Supports local execution and TestMu AI cl
testcontainerswshaddix/dotnet-skills574 installsPatterns for using Testcontainers in .NET integration tests to spin up real dependencies like databases and message queues. Use when writing integration tests t