# Flatten Repo Testing

> Manage test architecture and execution strategy for unit, integration, and end-to-end tests in flatten-repo. Use when this capability is needed.

- Skill: `tomevault-io/flatten-repo-testing` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/flatten-repo-testing`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/flatten-repo-testing/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/flatten-repo-testing

---


# Flatten Repo Testing

## Scope

Use this skill for pytest organization, markers, defaults, and test quality.

## Rules

1. Test layout:
   - `tests/unit/flatten_repo/` for unit tests.
   - `tests/integration/` for integration tests.
   - `tests/end2end/` for end-to-end tests.
2. Marker strategy:
   - Unit: `unit`
   - Integration: `integration`
   - End-to-end: `end2end`
3. Auto-tag tests from directory with `tests/conftest.py` collection hooks.
4. Default run must execute only unit tests via pytest addopts (`-m unit`).
5. Keep tests deterministic and filesystem-local (no network).
6. Prefer function-based tests over class/object-based tests.
7. Keep imports at the top of test files, never inside test functions.
8. For mocking, use `pytest_mock.MockerFixture` and the `mocker` fixture instead of `unittest.mock`.
9. For CLI changes, include tests for both behavior and UX flags (`--help`, `--version` when relevant).

## Validation

Run:
- `uv run pytest`
- `uv run pytest -m integration`
- `uv run pytest -m end2end`

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/guillaume-lombardo) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-14 -->

