python-testing
Skill1 starsChanged 11 months agoMITView on GitHub
Write pytest tests with fixtures, mocking, and async support. Use when writing unit tests, test files, test fixtures, or improving test coverage in backend/tests/.
53 other projects use a version of this.
Adopted by
Most recently taken up by
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- dmoreq/agent-grimoiretheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
- ahmadvahidi/skill-atlastheir own version, first seen Nov 8, 2026
- Ashfaqbs/ai-coding-agent-toolkittheir own version, first seen Nov 8, 2026
- pankaj-mahaur/Agent-Daemontheir own version, first seen Nov 6, 2026
Used with
Projects with it also use django-verification, python-patterns and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
mstuder-slalomSkilldjango-verification
Verification loop for Django projects: migrations, linting, tests with coverage, security scans, and deployment readiness checks before release or PR.
Also in 9 projects that use this
xenitV1Skillpython-patterns
Python development principles and decision-making. Framework selection, async patterns, type hints, project structure. Teaches thinking, not copying.
Also in 22 projects that use this
HABUBUSSSkillproject-guidelines-example
Also in 8 projects that use this
AshfaqbsSkillspringboot-tdd
Test-driven development for Spring Boot using JUnit 5, Mockito, MockMvc, Testcontainers, and JaCoCo. Use when adding features, fixing bugs, or refactoring.
Also in 7 projects that use this
mstuder-slalomSkillspringboot-security
Spring Security best practices for authn/authz, validation, CSRF, secrets, headers, rate limiting, and dependency security in Java Spring Boot services.
Also in 8 projects that use this
nek1987Skillpostgres-patterns
PostgreSQL patterns for reviewing migrations and writing efficient queries. Use when reviewing Alembic migrations, optimizing queries, or debugging database issues.
Also in 15 projects that use this
- +2 more from mstuder-slalom
Other versions53 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 53
- ComposioHQ/composio★ 31ksame name
- microsoft/agent-framework★ 15ksame name
- openJiuwen-ai/agent-core★ 464same name
- Mindrally/skills★ 275same name
- loulanyue/awesome-claude-notes★ 272same name
- Fmarzochi/EGC★ 61same name
- Ashfaqbs/ai-coding-agent-toolkit★ 27same name
- FaisalAlqarni/sp-ecc★ 9same name
- DetectHensenberg/RAG4JZDQ★ 8same name
- gongyijie85/dsh-ecc★ 8same name
43 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- fastapi-backendSkill
- llm-integrationSkill
- nextjs-frontendSkill
- project-documentationSkill
- security-reviewSkill
- sqlalchemy-databaseSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 48 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 10
Use pytest with pytest-asyncio for async code
- Distinctive: line 55
All tests must pass before commits
- Distinctive: line 56
Use fixtures for shared setup
- Distinctive: line 58
Test async code with @pytest.mark.asyncio
- Distinctive: line 59
Use descriptive assertion messages
- Distinctive: line 60
Test edge cases and error conditions
“Common” is measured: kept by at least 6 in 10 of the 48 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Python Testing with Pytest
ETPS Test Structure
- Tests live in
backend/tests/test_*.py - Use
pytestwithpytest-asynciofor async code - Mock LLM:
from services.llm.mock_llm import MockLLM - Current test count: 700+ passing
Test Pattern
import pytest
from services.llm.mock_llm import MockLLM
@pytest.mark.asyncio
async def test_my_function():
mock_llm = MockLLM()
result = await some_async_function(llm=mock_llm)
assert result == expectedRunning Tests
cd backend
python -m pytest -v # All tests
python -m pytest tests/test_file.py -v # Specific file
python -m pytest --tb=long # Full tracebacks
python -m pytest -k "keyword" # Filter by nameKey Test Files
test_pagination_allocation.py- Pagination servicetest_bullet_rewriter.py- Bullet operationstest_critic.py- Quality evaluationtest_skill_gap.py- Skill analysistest_text_output.py- Resume/cover letter text outputtest_security.py- Security tests
Mocking Patterns
# Mock LLM
from services.llm.mock_llm import MockLLM
mock_llm = MockLLM()
# Mock database session
from unittest.mock import MagicMock
mock_db = MagicMock()Best Practices
- All tests must pass before commits
- Use fixtures for shared setup
- Mock external services (LLM, vector store, APIs)
- Test async code with @pytest.mark.asyncio
- Use descriptive assertion messages
- Test edge cases and error conditions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

