Skip to main content

Pytest plugin for TDD Guard - enforces Test-Driven Development principles

Project description

TDD Guard Pytest Reporter

Pytest plugin that captures test results for TDD Guard validation.

Requirements

  • Python 3.8+
  • pytest 6.0+
  • TDD Guard installed globally

Installation

pip install tdd-guard-pytest

The plugin activates automatically when installed.

Configuration

TDD Guard needs consistent test result locations. Two configurations ensure this:

  1. Environment variable - Keeps Claude Code in the project root
  2. Pytest setting - Tells the reporter where to save results

Environment Setup

Set Claude Code to maintain the project root:

# In ~/.zshrc or ~/.bashrc
export CLAUDE_BASH_MAINTAIN_PROJECT_WORKING_DIR=1

This returns Claude Code to the project root after each command. See environment variables documentation for details.

Restart your terminal or run source ~/.zshrc after adding.

Project Root Configuration

Set tdd_guard_project_root to your project root using any ONE of these methods:

Option 1: pyproject.toml

[tool.pytest.ini_options]
tdd_guard_project_root = "/absolute/path/to/project/root"

Option 2: pytest.ini

[pytest]
tdd_guard_project_root = /absolute/path/to/project/root

Option 3: setup.cfg

[tool:pytest]
tdd_guard_project_root = /absolute/path/to/project/root

Configuration Rules

  • Path must be absolute
  • Current directory must be within the configured project root
  • Falls back to current directory if configuration is invalid

More Information

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tdd_guard_pytest-0.1.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tdd_guard_pytest-0.1.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file tdd_guard_pytest-0.1.1.tar.gz.

File metadata

  • Download URL: tdd_guard_pytest-0.1.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for tdd_guard_pytest-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8345c1823c21201aaa728b0aa36ade069aead67b73843cd6b1331be91407ac53
MD5 5bb9a5b067587336ae359b1f8d00e0f9
BLAKE2b-256 5d878f3be66993d130d5a6081f0d0630504c4eae237cc98b0cca1ea0364183c4

See more details on using hashes here.

File details

Details for the file tdd_guard_pytest-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for tdd_guard_pytest-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f926a94b2b0473e38c0a006264f057e35037ea94b879188fd999ca7e71931a26
MD5 2b27581ad9af53ca77531cb58a20c3a2
BLAKE2b-256 ab9f58ef92f5cf4ee3423f252e4fa8d9e87962121e061b40923df3eec3d52818

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page