CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-tox-pyenv

tox plugin that makes tox use `pyenv which` to find python executables

Overall
score

98%

Overview
Eval results
Files

rubric.jsonevals/scenario-8/

{
  "context": "This criteria evaluates how well the engineer implements the fallback mechanism for Python executable discovery using subprocess. The focus is on correct usage of subprocess.run() or subprocess.Popen() for external command execution, proper handling of command failures, and implementing the fallback logic by returning None when the primary command fails.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "subprocess execution",
      "description": "Uses subprocess.run() or subprocess.Popen() to execute the command '<primary_command> which <basepython>' with proper arguments",
      "max_score": 25
    },
    {
      "name": "stdout capture",
      "description": "Captures stdout from the subprocess to retrieve the Python executable path, using capture_output=True, stdout=subprocess.PIPE, or equivalent",
      "max_score": 15
    },
    {
      "name": "exit code handling",
      "description": "Checks the subprocess return code or exit status to detect command failures (non-zero exit codes)",
      "max_score": 20
    },
    {
      "name": "OSError handling",
      "description": "Catches OSError exceptions that occur when the primary command is not found or cannot be executed",
      "max_score": 15
    },
    {
      "name": "fallback on failure",
      "description": "Returns None when the primary command fails (non-zero exit code) to trigger tox's default discovery mechanism",
      "max_score": 10
    },
    {
      "name": "fallback on OSError",
      "description": "Returns None when OSError is raised to trigger tox's default discovery mechanism",
      "max_score": 10
    },
    {
      "name": "empty result handling",
      "description": "Returns None when the subprocess returns an empty or whitespace-only string",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-tox-pyenv

tile.json