Python Testing
athola/claude-night-market
Python testing patterns with pytest, fixtures, TDD, mocking, async and integration tests.
Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns.
$ npx skills add LeoYeAI/openclaw-master-skills --skill clean-pytest -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills clean-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/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/clean-pytest .claude/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .claude/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-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 LeoYeAI/openclaw-master-skills --skill clean-pytest -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills clean-pytest --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .agents/skills && cp -r skills-src/skills/clean-pytest .agents/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .agents/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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 LeoYeAI/openclaw-master-skills --skill clean-pytest -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills clean-pytest --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/skills/clean-pytest .cursor/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .cursor/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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/LeoYeAI/openclaw-master-skills.git --path skills/clean-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 LeoYeAI/openclaw-master-skills --skill clean-pytest -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install LeoYeAI/openclaw-master-skills clean-pytest --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/skills/clean-pytest .gemini/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .gemini/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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 LeoYeAI/openclaw-master-skills clean-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 LeoYeAI/openclaw-master-skills --skill clean-pytest -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .github/skills && cp -r skills-src/skills/clean-pytest .github/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .github/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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 LeoYeAI/openclaw-master-skills --skill clean-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 LeoYeAI/openclaw-master-skills clean-pytest --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/skills/clean-pytest .opencode/skills/clean-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 "clean-pytest" agent skill from https://github.com/LeoYeAI/openclaw-master-skills/tree/main/skills/clean-pytest into .opencode/skills/clean-pytest/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "clean-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.
clean-pytestWrite clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns.
Clean Pytest is an agent skill from LeoYeAI/openclaw-master-skills. Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns. Use when setting up test suites for Python/MCP projects, creating Fakes for external dependencies, writing contract tests, or implementing test patterns with fixtures and parametrization.
Its SKILL.md is about 4.2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files (for example `_meta.json` and `skill.json`).
It sits in Testing & QA, covering Unit testing, Integration testing and Design patterns. It works with pytest, Model Context Protocol and Python. The repository describes itself as: 🧠 Curated collection of 1209+ best OpenClaw skills — weekly updated by MyClaw.ai. The licence is MIT.
4 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit e5199b5. 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:
pytestFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names these keys or tokens, usually read from environment variables:
GOOGLE_APPLICATION_CREDENTIALSFrom names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Clean Pytest loads about 4.2k tokens when it runs. Until then it costs about 80 tokens; SKILL.md has 396 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 LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 396 words, ~4,218 tokens.
.claude/skills/clean-pytest/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Clean, maintainable pytest test patterns using Fake-based testing, contract testing, and dependency injection. Focuses on test isolation, reusability, and clarity through explicit AAA pattern and well-structured fixtures.
Use Fake classes instead of mocking with unittest.mock. Fakes are in-memory implementations that mimic real dependencies without external calls.
Why Fakes?
Structure every test into three clear phases with comments:
# Arrange
# Set up test data and dependencies
# Act
# Execute the code under test
# Assert
# Verify the resultInject dependencies between fixtures to maintain relationships and avoid duplication.
Verify that components register tools/functions correctly and pass expected arguments.
Controller (MCP Tools)
↓
Service (Business Logic)
↓
Repository (Data Access)
↓
Fake (Test Implementation)Create a Fake class that implements the same interface as the real dependency:
# tests/fakes.py
from typing import Any, Dict, List, Optional
class FakeAuth:
"""Fake implementation of AuthProvider for testing."""
def __init__(self) -> None:
self.created: List[Dict[str, Any]] = []
self.deleted: List[str] = []
self._seq = 0
self.fail_on_create: bool = False
def create_user(self, email: str, password: str, display_name: str) -> str:
if self.fail_on_create:
raise RuntimeError("create_user failed (fake)")
self._seq += 1
uid = f"uid-{self._seq}"
rec = {"uid": uid, "email": email, "display_name": display_name}
self.created.append(rec)
return uid
def delete_user(self, uid: str) -> None:
self.deleted.append(uid)class FakeUsersRepo:
"""Fake implementation of UsersRepository."""
def __init__(self) -> None:
self.users: Dict[str, Dict[str, Any]] = {}
self.fail_on_upsert: bool = False
def upsert_user_doc(self, uid: str, data: Dict[str, Any]) -> None:
if self.fail_on_upsert:
raise RuntimeError("upsert_user_doc failed (fake)")
self.users[uid] = dict(data)
def list_users(self, limit: Optional[int] = None) -> List[Dict[str, Any]]:
items = list(self.users.values())
if limit and limit > 0:
items = items[:limit]
return [dict(it) for it in items]class FakeAuth:
def __init__(self) -> None:
self.fail_on_create: bool = False # Control failure in tests
def create_user(self, email: str, password: str, display_name: str) -> str:
if self.fail_on_create:
raise RuntimeError("create_user failed (fake)")
# ... rest of implementationclass FakeSectorsRepo:
def __init__(self, institutions: FakeInstitutionsRepo | None = None) -> None:
self.institutions = institutions # Inject dependency
self.data: Dict[str, Dict[str, Dict[str, Any]]] = {}
def institution_exists(self, institution_id: str) -> bool:
return bool(self.institutions and institution_id in self.institutions.data)
def upsert_sector(self, institution_id: str, sector_id: str, data: Dict[str, Any]) -> None:
self.data.setdefault(institution_id, {})[sector_id] = dict(data)# tests/conftest.py
import pytest
from tests.fakes import FakeAuth, FakeUsersRepo
@pytest.fixture()
def fake_auth():
"""Provide a fresh FakeAuth for each test."""
return FakeAuth()
@pytest.fixture()
def fake_users_repo():
"""Provide a fresh FakeUsersRepo for each test."""
return FakeUsersRepo()@pytest.fixture()
def fake_sectors_repo(fake_institutions_repo):
"""FakeSectorsRepo depends on FakeInstitutionsRepo."""
return FakeSectorsRepo(institutions=fake_institutions_repo)
@pytest.fixture()
def fake_rooms_repo(fake_sectors_repo):
"""FakeRoomsRepo depends on FakeSectorsRepo."""
return FakeRoomsRepo(sectors=fake_sectors_repo)@pytest.fixture()
def user_env(fake_auth, fake_users_repo):
"""Provide service and all dependencies for user operations."""
from myapp.services.user_service import UserService
svc = UserService(fake_auth, fake_users_repo)
return svc, fake_auth, fake_users_repo@pytest.fixture()
def user_env_seeded(user_env):
"""Environment with pre-seeded data."""
svc, auth, repo = user_env
svc.add_user(email="test@example.com", password="secret", name="Test User")
return svc@pytest.fixture()
def temp_file():
"""Provide a temporary file and clean up after test."""
import tempfile
import os
fd, path = tempfile.mkstemp()
os.close(fd)
yield path
os.unlink(path)# tests/test_user_service.py
import pytest
from myapp.services.user_service import UserService
def test_add_user_success(fake_auth, fake_users_repo):
# Arrange
svc = UserService(fake_auth, fake_users_repo)
email = "test@example.com"
password = "secret"
name = "Test User"
# Act
result = svc.add_user(email=email, password=password, name=name)
# Assert
assert result["status"] == "ok"
assert result["user"]["email"] == email
assert result["user"]["name"] == name
assert result["uid"] in fake_users_repo.users@pytest.mark.parametrize(
"email,password,name,role",
[
("a@example.com", "secret", "Alice", "admin"),
("b@example.com", "p@ss", "Bob", "user"),
],
)
def test_add_user_parametrized(user_env, email, password, name, role):
svc, _auth, _repo = user_env
# Act
res = svc.add_user(email=email, password=password, name=name, global_role=role)
# Assert
assert res["status"] == "ok"
assert res["user"]["email"] == email
assert res["user"]["name"] == name
assert res["user"]["globalRole"] == role@pytest.mark.parametrize("email", ["c@example.com", "d@example.com"])
def test_add_user_rollback_on_firestore_failure(fake_auth, fake_users_repo, email):
# Arrange
fake_users_repo.fail_on_upsert = True
svc = UserService(fake_auth, fake_users_repo)
# Act & Assert
with pytest.raises(RuntimeError):
svc.add_user(email=email, password="secret", name="Bob")
# Assert rollback
assert fake_auth.deleted, "Expected auth user to be deleted on Firestore failure"def test_list_users_normalizes_timestamps_to_iso(user_env):
# Arrange
svc, _auth, repo = user_env
from datetime import datetime
repo.users["u1"] = {
"id": "u1",
"email": "x@y.z",
"name": "X",
"globalRole": "user",
"createdAt": datetime(2024, 1, 1),
"updatedAt": datetime(2024, 1, 2),
}
# Act
res = svc.list_users(limit=10)
# Assert
assert res["status"] == "ok"
assert res["count"] == 1
user = res["users"][0]
assert isinstance(user["createdAt"], str)
assert isinstance(user["updatedAt"], str)Test that controllers properly register tools with expected signatures:
# tests/test_controllers_contract.py
from typing import Any, Callable, Dict
class FakeMCP:
"""Minimal FakeMCP for contract testing."""
def __init__(self) -> None:
self.tools: Dict[str, Callable[..., Any]] = {}
self.meta: Dict[str, Dict[str, Any]] = {}
def tool(self, name: str, description: str, tags: Optional[set] = None, meta: Optional[dict] = None):
def decorator(fn: Callable[..., Any]):
self.tools[name] = fn
self.meta[name] = {
"description": description,
"tags": set(tags or set()),
"meta": dict(meta or {}),
}
return fn
return decorator
class FakeUserService:
"""Simple fake service that records calls."""
def __init__(self):
self.calls = []
def add_user(self, **kwargs):
self.calls.append(("add_user", kwargs))
return {"status": "ok", "op": "add_user", "args": kwargs}
def test_users_controller_contract():
# Arrange
from myapp.controllers.users_controller import UsersController
fake = FakeMCP()
svc = FakeUserService()
UsersController(fake, svc)
# Assert tool registration
assert "add_user" in fake.tools
assert "list_users" in fake.tools
# Act & Assert tool behavior
res = fake.tools["add_user"](
email="a@x.y", password="s3cr3t", name="Alice", global_role="admin"
)
assert res["status"] == "ok"
assert res["op"] == "add_user"
assert res["args"]["email"] == "a@x.y"@pytest.mark.parametrize(
"email,password,name,role",
[
("a@x.y", "s3cr3t", "Alice", "admin"),
("b@x.y", "p@ssw0rd", "Bob", "user"),
],
)
def test_users_add_user_parametrized(_users_env, email, password, name, role):
# Arrange
fake, _ = _users_env
# Act
res = fake.tools["add_user"](
email=email, password=password, name=name, global_role=role
)
# Assert
assert res["status"] == "ok"
assert res["op"] == "add_user"
assert res["args"]["email"] == email@pytest.fixture()
def repo_env(fake_institutions_repo, fake_sectors_repo):
# Seed data
fake_institutions_repo.upsert("inst1", {"id": "inst1", "name": "Inst One"})
fake_sectors_repo.upsert_sector(
"inst1", "er", {"id": "er", "name": "ER", "slug": "er", "isActive": True}
)
return fake_sectors_repo@pytest.mark.parametrize("rooms", [
["101"],
["201", {"name": "102", "id": "room-102"}],
])
def test_add_and_list_rooms(room_env, rooms):
svc, _ = room_env
# Act
res = svc.add_sector_rooms("inst1", "er", rooms)
# Assert
assert res["status"] == "ok"
assert res["count"] == len(rooms)
lst = svc.list_sector_rooms("inst1", "er", limit=10)
assert lst["status"] == "ok"
assert lst["count"] == len(rooms)@pytest.mark.parametrize("limit", [1, 3])
def test_list_rooms_limits(room_env_seeded, limit):
svc = room_env_seeded
# Act
lst = svc.list_sector_rooms("inst1", "er", limit=limit)
# Assert
assert lst["status"] == "ok"
assert lst["count"] == min(2, limit) # 2 items seeded@pytest.mark.parametrize("room_id,deleted", [
("room-102", True),
("room-999", False),
])
def test_remove_rooms_parametrized(room_env_seeded, room_id, deleted):
svc = room_env_seeded
# Act
res = svc.remove_sector_room("inst1", "er", room_id)
# Assert
assert res["deleted"] is deleted
if not deleted:
assert res.get("reason") == "room_not_found"Skip integration tests when external dependencies are not available:
# tests/test_integration_wiring.py
import os
import pytest
# Gate this integration test on presence of credentials
_ENV_KEYS = (
"FIREBASE_SERVICE_ACCOUNT",
"GOOGLE_APPLICATION_CREDENTIALS",
)
_has_env_creds = any(os.getenv(k) for k in _ENV_KEYS)
pytestmark = [
pytest.mark.integration,
pytest.mark.skipif(
not _has_env_creds,
reason=(
"Integration test requires Firebase Admin credentials via env "
"(FIREBASE_SERVICE_ACCOUNT or GOOGLE_APPLICATION_CREDENTIALS)"
),
),
]
@pytest.mark.integration
def test_build_app_initializes_and_registers_tools():
# Arrange
from myapp.wiring import build_app
# Act
app = build_app()
# Assert
assert hasattr(app, "run")Each test should be independent and not share state:
def test_user_created_in_one_test_not_visible_in_another(fake_auth, fake_users_repo):
# Arrange
svc1 = UserService(fake_auth, fake_users_repo)
# Act
result1 = svc1.add_user(email="test1@example.com", password="secret", name="User1")
# Assert - second test with fresh fixtures should not see this user
svc2 = UserService(fake_auth, fake_users_repo)
users = svc2.list_users()
assert users["count"] == 1 # Only the user from this test❌ Bad - Mocking external library:
@patch('firebase_admin.auth.create_user')
def test_add_user(mock_create_user):
mock_create_user.return_value = Mock(uid="uid-1")
# ... test code✅ Good - Use Fake for your interface:
def test_add_user(fake_auth, fake_users_repo):
svc = UserService(fake_auth, fake_users_repo)
# ... test code❌ Bad - Testing internal method calls:
def test_add_user(fake_auth, fake_users_repo):
svc = UserService(fake_auth, fake_users_repo)
svc.add_user(email="test@example.com", password="secret", name="User")
assert fake_auth.created == [{"uid": "uid-1", ...}] # Implementation detail✅ Good - Testing observable behavior:
def test_add_user(fake_auth, fake_users_repo):
svc = UserService(fake_auth, fake_users_repo)
result = svc.add_user(email="test@example.com", password="secret", name="User")
assert result["status"] == "ok"
assert result["user"]["email"] == "test@example.com"❌ Bad - Only happy path:
def test_add_user_success(fake_auth, fake_users_repo):
# Only tests success case✅ Good - Test all scenarios:
def test_add_user_success(fake_auth, fake_users_repo):
# Happy path
def test_add_user_rollback_on_firestore_failure(fake_auth, fake_users_repo):
# Error path
def test_add_user_handles_duplicate_email(fake_auth, fake_users_repo):
# Edge case# Run all tests
pytest
# Run with coverage
pytest --cov=myapp --cov-report=term-missing
# Run specific test file
pytest tests/test_user_service.py
# Run specific test
pytest tests/test_user_service.py::test_add_user_success
# Run parametrized tests with verbose output
pytest -v tests/test_user_service.py::test_add_user_parametrized
# Skip integration tests
pytest -m "not integration"
# Run only integration tests
pytest -m integration
# Stop on first failure
pytest -x
# Show local variables on failure
pytest -l
# Run tests in parallel (with pytest-xdist)
pytest -n autounittest.mock© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in skills/clean-pytest of LeoYeAI/openclaw-master-skills.
Open the folder on GitHubat commit e5199b5
Clean 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 |
|---|---|---|---|---|---|---|
| Clean Pytest this skillLeoYeAI/openclaw-master-skills | 2.2k | — | ~4.2k | Automated safety check: Pass | MIT | |
| Python Testingathola/claude-night-market | 342 | — | ~800 | Automated safety check: Pass | MIT | |
| Adk Verify Snippetsgoogle/adk-python | 22k | — | ~1.4k | Automated safety check: Pass | Apache-2.0 | |
| Hermetic Python Unit TestsdimensionalOS/dimos | 4.6k | — | ~1.4k | Automated safety check: Pass | Custom licence | |
| Test Coverage Reviewareed1192/finance-news-aggregator | 149 | — | ~2.6k | Automated safety check: Pass | MIT | |
| JS-in-HTML Testingliaohch3/claude-tap | 3.3k | — | ~924 | Automated safety check: Pass | MIT |
athola/claude-night-market
Python testing patterns with pytest, fixtures, TDD, mocking, async and integration tests.
google/adk-python
Checks that every Python code block in a Markdown file actually compiles and runs, by extracting each block to a temporary file, executing it in an isolated subprocess, and writing a pass/fail…
dimensionalOS/dimos
Rules for writing, fixing and reviewing pytest unit tests that are hermetic: behavior-focused, deterministic, isolated and cheap to run.
areed1192/finance-news-aggregator
Audit, plan, write, and verify unit tests for Python projects using pytest.
liaohch3/claude-tap
Tests JavaScript embedded in an HTML file in two layers: pytest checks of the logic ported to Python, and Playwright runs in a real browser for the DOM.
389ds/389-ds-base
Add or extend a pytest integration test for 389 Directory Server under dirsrvtests/.
LeoYeAI/openclaw-master-skills
Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.
LeoYeAI/openclaw-master-skills
Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.
LeoYeAI/openclaw-master-skills
Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.
LeoYeAI/openclaw-master-skills
Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.
LeoYeAI/openclaw-master-skills
Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.
LeoYeAI/openclaw-master-skills
Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.
Works with
Categories
Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns. Clean Pytest is an agent skill from LeoYeAI/openclaw-master-skills. Write clean, maintainable pytest tests using Fake-based testing, contract testing, and dependency injection patterns.
Clean Pytest fits situations like: setting up test suites for Python/MCP projects; creating Fakes for external dependencies; writing contract tests; implementing test patterns with fixtures and parametrization.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill clean-pytest -a claude-code`. Or copy the skill folder (skills/clean-pytest in LeoYeAI/openclaw-master-skills) into .claude/skills/clean-pytest in your project. Claude Code loads it when a task matches its description.
Run `npx skills add LeoYeAI/openclaw-master-skills --skill clean-pytest -a codex`. Or copy the skill folder (skills/clean-pytest in LeoYeAI/openclaw-master-skills) into .agents/skills/clean-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 LeoYeAI/openclaw-master-skills --skill clean-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/clean-pytest, .gemini/skills/clean-pytest, .github/skills/clean-pytest and .opencode/skills/clean-pytest in your project.
Going by SKILL.md and its folder, Clean Pytest needs the command-line tools its instructions call (pytest) and credentials named GOOGLE_APPLICATION_CREDENTIALS. Our summary lists: Python 3.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. 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.
Clean Pytest is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.
About 4.2k tokens (SKILL.md is roughly 17k 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 Clean Pytest: Python Testing (athola/claude-night-market, 342 stars), Adk Verify Snippets (google/adk-python, 22k stars), Hermetic Python Unit Tests (dimensionalOS/dimos, 4.6k stars) and Test Coverage Review (areed1192/finance-news-aggregator, 149 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,159 GitHub stars. The repository holds 972 skills in this directory. The repository was last updated on July 20, 2026.
Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.