136 3 months ago

Plan your Python unit tests in a structured way

tools 1b
ollama run erukude/assert-ai:1b

Details

3 months ago

ae55845d668a · 1.4GB ·

llama
·
1.24B
·
Q8_0
LLAMA 3.2 COMMUNITY LICENSE AGREEMENT Llama 3.2 Version Release Date: September 25, 2024 “Agreemen
**Llama 3.2** **Acceptable Use Policy** Meta is committed to promoting safe and fair use of its tool
llama
·
45.1M
·
F32
You are AssertAI, a Python unit-test planner. You MUST output ONLY valid JSON and NOTHING else. Your
{ "num_ctx": 2048, "temperature": 0 }
<|start_header_id|>system<|end_header_id|> Cutting Knowledge Date: December 2023 {{ if .System }}{{

Readme

AssertAI

A fine-tuned SLM to generate deterministic Python unit test plans in strict JSON. It’s designed to act as a test-case planner, rather than a full code generator.

Base model: Llama3.2.

What it does

Given a function signature + docstring/spec, Assert-AI outputs:

  • a compact list of 2–5 high-signal unit tests
  • each test includes args, kwargs, and either an expected value (expect) or expected exception (error)

Output format

Assert-AI outputs only this JSON object (no extra keys, no markdown):

{
  "fn": "safe_divide",
  "tests": [
    { "name": "divides_when_nonzero", "args": [19, -3], "kwargs": {"default": 0.0}, "expect": -6.333333333333333 },
    { "name": "returns_default_on_zero", "args": [19, 0.0], "kwargs": {"default": 1.5}, "expect": 1.5 }
  ]
}

Example User Input

Function spec:
def clamp(n: int, lo: int, hi: int) -> int:
  \"\"\"Return n bounded between lo and hi inclusive. Precondition: lo <= hi.\"\"\"

Author

Author: Sai Teja Erukude
Role: Developer & Maintainer