tessl install tessl/pypi-tox-pyenv@1.1.0tox plugin that makes tox use `pyenv which` to find python executables
Agent Success
Agent success rate when using this tile
98%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.03x
Baseline
Agent success rate without this tile
95%
{
"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
}
]
}