Skip to main content

CLI to generate and update Python unit tests automatically using coverage and AI

Project description

AIUnitTest

AIUnitTest is a command-line tool that reads your pyproject.toml and test coverage data (.coverage) to generate and update missing Python unit tests using AI.

Features

  • Coverage Analysis: Uses Coverage.py API to identify untested lines.
  • AI-Powered Test Generation: Calls OpenAI GPT to create or enhance test cases.
  • Config-Driven: Automatically picks up coverage.run.source and pytest.ini_options.testpaths from pyproject.toml.
  • Auto Mode: --auto flag sets source and tests directories without manual arguments.
  • Async & Parallel: Speeds up OpenAI requests for large codebases.

How to Run

  1. Install the project:

    pip install .
    
  2. Run the script:

    ai-unit-test --auto
    

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

aiunittest-0.0.1.tar.gz (26.9 kB view details)

Uploaded Source

Built Distribution

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

aiunittest-0.0.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file aiunittest-0.0.1.tar.gz.

File metadata

  • Download URL: aiunittest-0.0.1.tar.gz
  • Upload date:
  • Size: 26.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aiunittest-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3659abd68cce6aa4ea1b89881ec1c0a14be2b98b64d014e53d72e53f918dc18e
MD5 da18a1f6bad8e99368fe8f6f3d58c392
BLAKE2b-256 b0f302f563f0d66bd5d69323d11df85e88c725ee30df9c85495297e1a5812dff

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiunittest-0.0.1.tar.gz:

Publisher: release.yml on Ofido/AIUnitTest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiunittest-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: aiunittest-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for aiunittest-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f4080bcc397b148e8c40b953529773dbc642a076f7030c2671df6940394d04
MD5 983935e80008e697fc03735cfe67d357
BLAKE2b-256 15ce42b3ae0422ac5ee602390289fc64332e0540a94498ab14547b4742b61df3

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiunittest-0.0.1-py3-none-any.whl:

Publisher: release.yml on Ofido/AIUnitTest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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