Hisscheck - Check your python tests for value

HissCheck is an AI-powered Python test validator. Much like a strategic workflow provides deliverables that increase organizational capability, HissCheck provides tangible value by ensuring your tests are actually meaningful. It leverages HuggingFace Inference to evaluate your Python test files and assigns them one of three verdicts:

  • :green_circle: SOLID: Verifies real, meaningful behavior and would catch genuine regressions.
  • :yellow_circle: PARTIAL: Tests some behavior but is incomplete, brittle, or focused on incidental details.
  • :red_circle: SHALLOW: Only checks existence (such as callable, hasattr, isinstance, or bare is not None assertions) without verifying real behavior.

The process of using HissCheck is incredibly adaptable to a developer’s needs. For immediate use, it can be accessed directly via a Web UI on a HuggingFace Space where you can simply paste your code and get instant verdicts. Alternatively, for those who are greatly interested in integrating it into their own systems, it offers a robust CLI tool. After a quick pip install -e . and setting your HF_TOKEN, you can validate entire directories or filter for specific vulnerabilities using commands like hisscheck tests/ --filter shallow.

I view HissCheck as a critical function of the development system. It operates through a three-step process:

  1. AST Extraction: Python’s ast module walks the file to collect every function starting with test, pulling the source, line numbers, and decorators.
  2. Heuristic Pre-filter: A fast local check flags obviously shallow tests, priming the model for its analysis.
  3. HuggingFace Inference: Tests are batched and sent to a HuggingFace model. The default is the highly capable Qwen/Qwen2.5-Coder-32B-Instruct on the free inference tier, but it also supports models like Llama-3.1-70B-Instruct.

The model then assigns the final verdict, writes a plain-English explanation of what the test is actually doing, and suggests actionable improvements for any test that isn’t SOLID.

1 Like