tessl install tessl/pypi-crosshair-tool@0.0.0Analyze Python code for correctness using symbolic execution and SMT solving to automatically find counterexamples for functions with type annotations and contracts.
Agent Success
Agent success rate when using this tile
86%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
69%
A utility that automatically generates comprehensive test suites for Python functions to maximize code coverage.
Given a Python module containing a function calculate_grade(score: int) -> str that returns "A" for scores >= 90, "B" for scores >= 80, "C" for scores >= 70, "D" for scores >= 60, and "F" otherwise, generate a test file that achieves complete branch coverage @test
Given a Python module with a function process_data(items: list, threshold: int) -> list that filters items greater than threshold and raises ValueError if items is empty, generate a test file that covers all execution paths including the exception case @test
Given a Python module with a function validate_email(email: str) -> bool that checks if an email contains "@" and ".", generate a test file with tests formatted as complete pytest functions @test
@generates
def generate_tests(module_path: str, output_path: str) -> bool:
"""
Generates a comprehensive test suite for the given Python module.
Args:
module_path: Path to the Python module to generate tests for
output_path: Path where the generated test file should be written
Returns:
bool: True if test generation was successful, False otherwise
"""
passProvides automatic test generation with coverage analysis using symbolic execution.