
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
AIUnitTest
Advanced tools
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.
coverage.py to identify lines of code
that are not covered by your existing test suite.coverage.run.source and
pytest.ini_options.testpaths from pyproject.toml.--auto flag sets source and tests directories without
manual arguments.There are two ways to install AIUnitTest:
You can install the latest stable version from PyPI:
pip install AIUnitTest
AIUnitTest supports optional features that can be installed as needed:
pip install AIUnitTest
pip install AIUnitTest[huggingface]
pip install AIUnitTest[faiss]
pip install AIUnitTest[all]
pip install AIUnitTest[dev]
You can also combine multiple extras:
pip install AIUnitTest[huggingface,faiss]
Clone the repository:
git clone https://github.com/ofido/AIUnitTest.git
cd AIUnitTest
Install the project in editable mode:
pip install -e .
# Or with optional dependencies:
pip install -e .[all]
The easiest way to run the tool is in automatic mode.
It will automatically discover your source and test folders
from your pyproject.toml file.
ai-unit-test --auto
You can also specify the source and test folders manually:
ai-unit-test --folders src --tests-folder tests
You can also generate a test for a single function:
ai-unit-test func my_module/my_file.py my_function
You can index your tests for semantic search:
ai-unit-test index
And then search for tests related to a specific query:
ai-unit-test search "my search query"
--folders: The source code folders to analyze.--tests-folder: The folder where the tests are located.--coverage-file: The path to the .coverage file.--auto: Try to discover folders/tests from pyproject.toml.AIUnitTest uses the standard pyproject.toml file for configuration.
Here are the relevant sections:
[tool.coverage.run]:
source: A list of source code folders.[tool.pytest.ini_options]:
testpaths: A list of test folders.Contributions are welcome! Please feel free to submit a pull request or open an issue.
This project is licensed under the MIT License see the LICENSE file for details.
FAQs
CLI to generate and update Python unit tests automatically using coverage and AI
We found that AIUnitTest demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.