{"data":{"kind":"file","path":"README.md","version_id":"sa2ermghuvlxju98pj7q7wfj","entry":{"name":"README.md","path":"README.md","is_directory":false,"size":1855,"modified_at":"2026-08-09T12:35:50.573000","content_hash":"8c5ee57dd15bcda22d01b86f7b5ed09028f7e258ff7be2388a46855d4a229a80"},"entries":[],"content":"# Unit Test Generator & Coverage Optimizer\n\nEvaluate an LLM's ability to generate comprehensive, correct unit tests that maximize code coverage for given Python functions.\n\n## Overview\n\nThis environment presents Python functions (with docstrings and type hints) and asks the model to generate pytest-compatible unit tests. Scoring is multi-dimensional:\n\n1. **Syntax validity** - Are the generated tests syntactically valid Python?\n2. **Test execution** - Do the tests actually run without errors?\n3. **Correctness detection** - Can the tests correctly identify buggy vs correct implementations?\n4. **Coverage breadth** - Do the tests cover edge cases, boundary values, error paths, and normal paths?\n5. **Test diversity** - Are tests varied (not just repeating the same assertion pattern)?\n\n## Difficulty Levels\n\n- **Level 0**: Simple pure functions (math, string manipulation)\n- **Level 1**: Functions with conditionals and loops\n- **Level 2**: Functions with exceptions, type coercion, edge cases\n- **Level 3**: Multi-function modules with interdependencies\n- **Level 4**: Real-world patterns (file I/O mocks, API calls, class methods)\n\n## Scoring\n\n| Metric | Weight | Description |\n|--------|--------|-------------|\n| `syntax_score` | 0.15 | Tests parse without SyntaxError |\n| `execution_score` | 0.25 | Tests run without unexpected failures |\n| `coverage_score` | 0.30 | Line/branch coverage of target function |\n| `edge_case_score` | 0.20 | Boundary values, None, empty, negative, overflow |\n| `diversity_score` | 0.10 | Unique assertion patterns and test strategies |\n\n## Usage\n\n```python\nimport verifiers as vf\nenv = vf.load_environment(\"jackson/unit-test-gen\")\n```\n\n## Training Data\n\n200+ carefully crafted Python functions with known edge cases, designed to test whether the model can reason about code paths and generate meaningful assertions.\n","encoding":"utf-8","truncated":false,"total_bytes":1855},"status":null}