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 uses Python's subprocess module to execute external commands with proper error handling. The focus is on correct usage of subprocess.Popen or subprocess.check_output, proper stream management, exit code checking, and OSError exception handling.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Subprocess execution",
"description": "Uses subprocess.Popen to execute the version command with proper arguments (e.g., ['tool_name', '--version']). Should pass a list of command arguments rather than a shell string.",
"max_score": 20
},
{
"name": "Stream capture",
"description": "Properly captures both stdout and stderr using subprocess.PIPE or similar mechanism. Should set stdout=subprocess.PIPE and stderr=subprocess.PIPE in the Popen call.",
"max_score": 15
},
{
"name": "Text handling",
"description": "Uses universal_newlines=True parameter or text=True (Python 3.7+) in subprocess.Popen to handle text output consistently across Python versions, avoiding bytes vs string issues.",
"max_score": 15
},
{
"name": "Exit code checking",
"description": "Explicitly checks the subprocess exit code (returncode attribute) to determine if the command succeeded. Should raise CommandFailedError when returncode is non-zero.",
"max_score": 15
},
{
"name": "OSError handling",
"description": "Catches OSError (or FileNotFoundError in Python 3) when the subprocess fails to start because the tool is not found in PATH. Should raise ToolNotFoundError when OSError is caught.",
"max_score": 20
},
{
"name": "Exception hierarchy",
"description": "Implements the custom exception hierarchy correctly with VersionCheckError as the base class and ToolNotFoundError, CommandFailedError, and VersionMismatchError as derived classes.",
"max_score": 10
},
{
"name": "Error context",
"description": "Includes stderr output in CommandFailedError exceptions to provide debugging context when commands fail, similar to how tox-pyenv includes stderr in error messages.",
"max_score": 5
}
]
}