CtrlK
BlogDocsLog inGet started
Tessl Logo

testland/pytest-tests

Configures and runs pytest - the de facto Python test framework with fixture-based dependency injection (`@pytest.fixture` with scopes module/session/function), parametrize for table-driven tests (`@pytest.mark.parametrize`), markers (`@pytest.mark.skip` / `xfail` / `slow`), `conftest.py` for shared fixtures, plugin ecosystem (pytest-cov, pytest-asyncio, pytest-mock, pytest-xdist), `--lf`/`--ff` for fail-loop, coverage gating. Use when working with Python and needing the modern test framework.

75

Quality

94%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

coverage-and-ci.mdreferences/

pytest coverage config and CI integration

Deeper coverage configuration and CI wiring for pytest. The SKILL.md spine keeps the minimal pytest --cov ... --cov-fail-under=80 command; the exhaustive config and pipeline wiring live here.

Coverage config (pyproject.toml)

[tool.coverage.run]
source = ["src"]
branch = true
omit = ["**/__init__.py", "**/types.py"]

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING:",
    "raise NotImplementedError",
]
fail_under = 80

branch = true enables branch coverage (not just line coverage). exclude_lines drops lines that can never meaningfully be covered from the denominator. fail_under mirrors the --cov-fail-under flag as a config default.

CI integration (GitHub Actions)

- run: pip install -e .[dev]
- run: pytest --cov --cov-report=xml --cov-fail-under=80 --junitxml=junit.xml
- uses: codecov/codecov-action@v4
  with: { files: coverage.xml }

--junitxml=junit.xml emits a JUnit report for CI test-result annotations; --cov-report=xml emits coverage.xml for the coverage uploader.

Parallel execution (pytest-xdist)

pytest -n auto   # uses CPU count

pytest-xdist distributes tests across worker processes. Combine with coverage via --cov (pytest-cov merges per-worker data automatically).

SKILL.md

tile.json