Maintaining Python Tests
PostHog/posthog-foss
Maintains existing pytest and Django test suites without weakening correctness.
Instructions for running, writing, and maintaining tests in this project
$ npx skills add mathiasertl/django-ca --skill pytest -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install mathiasertl/django-ca pytest --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.opencode/skills/pytest .claude/skills/pytest && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .claude/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytestType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add mathiasertl/django-ca --skill pytest -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install mathiasertl/django-ca pytest --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.opencode/skills/pytest .agents/skills/pytest && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .agents/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mathiasertl/django-ca --skill pytest -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install mathiasertl/django-ca pytest --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.opencode/skills/pytest .cursor/skills/pytest && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .cursor/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/mathiasertl/django-ca.git --path .opencode/skills/pytest--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add mathiasertl/django-ca --skill pytest -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install mathiasertl/django-ca pytest --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.opencode/skills/pytest .gemini/skills/pytest && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .gemini/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install mathiasertl/django-ca pytestInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add mathiasertl/django-ca --skill pytest -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .github/skills && cp -r skills-src/.opencode/skills/pytest .github/skills/pytest && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .github/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add mathiasertl/django-ca --skill pytest -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install mathiasertl/django-ca pytest --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/mathiasertl/django-ca.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.opencode/skills/pytest .opencode/skills/pytest && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "pytest" agent skill from https://github.com/mathiasertl/django-ca/tree/main/.opencode/skills/pytest into .opencode/skills/pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "pytest", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
pytestInstructions for running, writing, and maintaining tests in this project
Pytest is an agent skill from mathiasertl/django-ca. Instructions for running, writing, and maintaining tests in this project
Its SKILL.md is about 920 tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Testing & QA, covering Unit testing, Cryptography and Backend development. It works with pytest, Django, Python and Pydantic. The repository describes itself as: A TLS certificate authority with CRL, OCSP, HSM and ACMEv2 support and more. The licence is GPL-3.0.
Read from SKILL.md and the folder at commit feabb70. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
uvapt-getFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Pytest loads about 924 tokens when it runs. Until then it costs about 20 tokens; SKILL.md has 400 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from mathiasertl/django-ca at commit feabb70, republished under its GPL-3.0 licence (© mathiasertl). 400 words, ~924 tokens.
.claude/skills/pytest/SKILL.md (or your agent's skills folder).uv run pytest --no-selenium # all tests with coverage (slow)
uv run pytest --no-selenium --no-cov # skip coverage (much faster for local work)
uv run pytest ca/django_ca/tests/test_models.py # single file
uv run pytest ca/django_ca/tests/test_models.py::Cls::method # single test
uv run pytest -k "test_something" # keyword filterWhen writing/updating tests, it is sufficient to test the added/updated tests. When updating fixtures, you can also only run the affected module.
--cov-fail-under=100 is in addopts — 100% coverage is enforced by default. New code must be covered or
use # pragma: no cover (version-conditional variants like # pragma: only cryptography>46 also exist).pytest-random-order).DJANGO_SETTINGS_MODULE=ca.test_settings is set automatically by pytest-env.ca/ and docs/source/ are on pythonpath via pytest config — no need to set PYTHONPATH manually when
running pytest.cert-data.json is loaded at test_settings.py import time; it must exist before any test run. Regenerate
with uv run python dev.py recreate-fixtures.contrib/selenium/geckodriver.softhsm2 (apt-get install softhsm2). Skip locally: --no-hsm.ca/django_ca/tests/COLUMNS=80 is set in pytest env to make argparse output deterministic.pytest_sessionstart to avoid freezegun/Pydantic metaclass conflicts —
do not move that import.CA_DIR = "/non/existent" in test settings — tests needing a real CA dir must use override_settings
or a temp-dir fixture.ca/django_ca/tests/.ca/django_ca/tests/models/test_<model>.py for Django models.unittest.TestCase classes.setUp/
tearDown.This section provides generic instructions how to use fixtures.
Always use pytest fixtures instead of setUp/tearDown-style functions.
Globally available fixtures are defined in ca/django_ca/tests/base/fixtures.py.
Fixtures required only by special cases (e.g. a special HTTP client used in many admin tests), define it in
a
conftest.py in the test submodule. If only a single test_*.py file needs it, define it in that file.
A constant instead of a fixture can be used for trivial values, never change and are not stored in the
database. Store them in ca/django_ca/tests/base/constants.py in this case.
When using fixtures in the function definition, please use the following order:
tmpdir).db, settings, client).conftest.py (e.g. db, settings, client).If a fixture value only needs to be requested, use request.getfixturevalue("fixture_name") instead of
adding it to the function signature to avoid linter warnings.
The project defines a few dynamically created fixtures, they are documented in
/home/mertl/git/mati/django-ca/docs/source/dev/testing.rst.
© mathiasertl, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .opencode/skills/pytest of mathiasertl/django-ca.
Open the folder on GitHubat commit feabb70
Pytest next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Pytest this skillmathiasertl/django-ca | 158 | — | ~924 | Automated safety check: Pass | GPL-3.0 | |
| Maintaining Python TestsPostHog/posthog-foss | 721 | — | ~2.5k | Automated safety check: Pass | MIT | |
| Pytestbobmatnyc/claude-mpm | 155 | — | ~8.2k | Automated safety check: Pass | MIT | |
| Run And Verifyaropan/clist | 439 | — | ~461 | Automated safety check: Pass | Apache-2.0 | |
| Python Devdoccker/cc-use-exp | 1.1k | — | ~790 | Automated safety check: Pass | Custom licence | |
| PythonMadAppGang/claude-code | 283 | — | ~2.8k | Automated safety check: Notes | MIT |
PostHog/posthog-foss
Maintains existing pytest and Django test suites without weakening correctness.
bobmatnyc/claude-mpm
pytest - Python's most powerful testing framework with fixtures, parametrization, plugins, and framework integration for FastAPI, Django, Flask
aropan/clist
Choose and run focused checks after changing CLIST Python code: Django tests, standalone pytest tests, offline parser fixtures, Ruff, or a relevant management-command check.
doccker/cc-use-exp
Python 开发规范。当用户操作 .py、pyproject.toml、requirements.txt、setup.py 文件, 或涉及 FastAPI、Django、Flask、pytest、asyncio 开发时触发。
MadAppGang/claude-code
A skill your agent uses when building FastAPI applications, implementing async endpoints, setting up Pydantic schemas, working with SQLAlchemy, or writing pytest tests for Python backend services.
SpillwaveSolutions/agent-brain
Modern Python coaching covering language foundations through advanced production patterns.
mathiasertl/django-ca
Start a local Django development server and make HTTP requests against it for interactive endpoint testing
Categories
Instructions for running, writing, and maintaining tests in this project. Pytest is an agent skill from mathiasertl/django-ca.
Pytest fits situations like: tasks that involve Unit testing; tasks that involve Cryptography; tasks that involve Backend development.
Run `npx skills add mathiasertl/django-ca --skill pytest -a claude-code`. Or copy the skill folder (.opencode/skills/pytest in mathiasertl/django-ca) into .claude/skills/pytest in your project. Claude Code loads it when a task matches its description.
Run `npx skills add mathiasertl/django-ca --skill pytest -a codex`. Or copy the skill folder (.opencode/skills/pytest in mathiasertl/django-ca) into .agents/skills/pytest in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add mathiasertl/django-ca --skill pytest -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pytest, .gemini/skills/pytest, .github/skills/pytest and .opencode/skills/pytest in your project.
Going by SKILL.md and its folder, Pytest needs the command-line tools its instructions call (uv and apt-get). Our summary lists: Python 3.
SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Pytest is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 924 tokens (SKILL.md is roughly 3.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Pytest: Maintaining Python Tests (PostHog/posthog-foss, 721 stars), Pytest (bobmatnyc/claude-mpm, 155 stars), Run And Verify (aropan/clist, 439 stars) and Python Dev (doccker/cc-use-exp, 1.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
mathiasertl (a GitHub user) maintains it in mathiasertl/django-ca, which has 158 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on October 4, 2026.
Source: mathiasertl/django-ca on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.