
Pytest Testing
This is a learning-focused skill that teaches you pytest fundamentals rather than a testing utility. It covers the usual pytest curriculum: fixtures, mocking, TDD workflows, and coverage measurement. Good if you're picking up pytest for the first time or need a structured refresher on testing patterns. The skill targets integration with CI/CD pipelines too, which is where pytest knowledge actually pays off in production codebases. It's passed security audits through Gen Agent Trust Hub, Socket, and Snyk. If you already know pytest well, this probably won't add much, but it's solid for getting up to speed on Python testing practices.
- GitHub stars
- 6
- last updated
- Aug 21, 2026
Install
$ npx -y skills add pluginagentmarketplace/custom-plugin-python --skill 'Pytest Testing' --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/pluginagentmarketplace/custom-plugin-python
- Categories
- Testing & QA, DevOps & CI/CD, Python
- First seen
- Jun 3, 2026