Skip to main content

python_aitest_writer

Generate comprehensive pytest test cases for your Python application using Claude AI.

Features

  • Automatically generates pytest-style test cases for your Python codebase
  • Uses Claude AI for high-quality, context-aware test generation
  • Writes tests to a tests/ directory in your project
  • CLI tool for easy integration into your workflow

Installation

pip install python_aitest_writer

Requirements

Usage

  1. Set your Anthropic API key:
    export ANTHROPIC_API_KEY=sk-ant-...
    
  2. Run the tool on your Python app:
    python-aitest-writer /path/to/your/python/app
    
    • The tool will scan all .py files, send them to Claude, and write generated tests to a tests/ directory inside your app.
  3. Run the generated tests:
    cd /path/to/your/python/app
    pytest
    

Troubleshooting

  • ModuleNotFoundError: Run pytest from your project root. The generated test files include a sys.path patch for import safety.
  • API Errors: Ensure your ANTHROPIC_API_KEY is set and valid.
  • No tests generated: Check that your app directory contains .py files and is accessible.

License

MIT

Metadata

Release files for python-aitest-writer 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for python-aitest-writer 0.1.0
File Size Uploaded Provenance
python_aitest_writer-0.1.0.tar.gz 4.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for python-aitest-writer 0.1.0
File Interpreter ABI Platform
python_aitest_writer-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.9 kB

Release files / python_aitest_writer-0.1.0.tar.gz

Download URL python_aitest_writer-0.1.0.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
1297db9478e6e9baf8465b64b6ddd92cd9ebd36cdee6af8eb95419877b9de8b2
BLAKE2b-256 checksum
How to use checksums
a02e4e7a37a1286d05cdca9b60562022b412e4b59c91e597e8dbb88eea9d969a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Release files / python_aitest_writer-0.1.0-py3-none-any.whl

Download URL python_aitest_writer-0.1.0-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
66ae8d3e4593c23abd8bf8adf263e5a0993d21e0cf337dbb20b8cc4fd07dc0cb
BLAKE2b-256 checksum
How to use checksums
5da0aadc74ea24c95dea4a85403cfbe79a1f759ecab61453384886aed4d2a83d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.12

Security for python-aitest-writer 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page