Skip to main content

TestForge

TestForge A CLI tool to generate pytest test cases using AI.

Features

  • Generate Tests: Automatically generates pytest test cases for a specified file or function.
  • Output Directory: Specify a custom output directory for the generated test files (default is the same as the file you're making tests for).
  • Configurable Endpoint: Set an environment variable TESTFORGE_INVITE for the endpoint URL.

Installation

Install TestForge via pip:

pip install testforge

Usage

Setting Up the Invite Code

TestForge requires an environment variable TESTFORGE_INVITE to get access to the beta. To set it up, use the following command:

export TESTFORGE_INVITE="YOURCODE"

Replace YOURCODE with the actual code you've received. This variable needs to be set in every session where you use TestForge or added to your shell configuration file (e.g., .bashrc or .zshrc) for persistence.

Command Options

TestForge provides several options that can be used in the command line:

  • Show Version: Check the version of TestForge.

    testforge -v
    
  • Generate Tests: Generate pytest cases for a specified file.

    testforge -f path/to/your/file.py
    
  • Generate Tests for a function only: Generate pytest cases for the specified function.

    testforge -f path/to/your/file.py -t function_name
    
  • Specify Output Directory: Define a custom directory for the generated test files.

    testforge -f path/to/your/file.py -o path/to/your/custom_output_directory
    

Example

export TESTFORGE_INVITE="INVITECODE"
testforge -f src/main.py -o tests

Metadata

Release files for testforge 1.0.6

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

Source distribution (sdist)

Source distribution for testforge 1.0.6
File Size Uploaded Provenance Actions
testforge-1.0.6.tar.gz 7.8 kB Without provenance Details for testforge-1.0.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for testforge 1.0.6
File Interpreter ABI Platform Actions
testforge-1.0.6-py3-none-any.whl Python 3 none any Details for testforge-1.0.6-py3-none-any.whl

Total release size: 15.7 kB

Release files / testforge-1.0.6.tar.gz

Download URL testforge-1.0.6.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c1b158dbdfd583e9b68ffcc18c76e53d553285a99fcbb57361c338bc604144c9
BLAKE2b-256 checksum
How to use checksums
69ec295884ecf5a19fb25547efb51ebd97f868dc9696c06ec964659f833f94f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Release files / testforge-1.0.6-py3-none-any.whl

Download URL testforge-1.0.6-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e196be0753f003c4c133b2044853d866b316808ff3c0b976241c85c45000c6b3
BLAKE2b-256 checksum
How to use checksums
0d90d584b188a527153684fcd25b242ef1902d07ba039fbb782e53d35aeba465
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

Security for testforge 1.0.6

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.

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