Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generates production-grade pytest tests for Python using fixtures, parametrize, markers, mocking and conftest patterns.
95% 100%+5 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
51 agent runs
1 forkA fork is a copy of this skill that someone made so they could edit it for their own use. The original doesn't change.
Use this skill when you need generates production-grade pytest tests in Python with fixtures, parametrize, markers, mocking, and conftest patterns. Use when user mentions "pytest", "conftest", "@pytest.fixture", "@pytest.mark", "Python test". Triggers on: "pytest", "conftest", "Python test", "parametrize", "Python fixtures".
Examples with Calculator, Database, APIClient or myapp functions require the project’s actual imports; they are patterns, not a bundled application. Inspect tests/conftest/plugins before running: collection imports code and tests can send email, mutate databases or call external APIs. Use synthetic fixtures and isolated targets; mock at the namespace where the code looks up a dependency. pytest-mock, pytest-asyncio, pytest-cov and pytest-xdist are optional plugins required by their specific examples.
import pytest
def test_addition():
assert 2 + 3 == 5
def test_exception():
with pytest.raises(ValueError, match="invalid literal"):
int("not_a_number")
class TestCalculator:
def test_add(self):
calc = Calculator()
assert calc.add(2, 3) == 5
def test_divide_by_zero(self):
with pytest.raises(ZeroDivisionError):
Calculator().divide(10, 0)
@pytest.fixture
def calculator():
return Calculator()
@pytest.fixture
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.