CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-invoke

Pythonic task execution library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks

Overall
score

96%

Overview
Eval results
Files

rubric.jsonevals/scenario-9/

{
  "context": "This criteria evaluates how well the engineer uses the invoke package's MockContext feature to test task code without executing actual shell commands. The focus is on proper usage of MockContext, Result objects, and test assertions to verify task behavior.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "MockContext instantiation",
      "description": "Uses MockContext class from invoke package to create a test context object instead of using a real Context",
      "max_score": 20
    },
    {
      "name": "Result configuration",
      "description": "Uses Result class from invoke package to pre-configure expected command outputs with appropriate stdout, stderr, and exit codes",
      "max_score": 25
    },
    {
      "name": "Command mapping",
      "description": "Properly configures the MockContext with a dictionary mapping commands to Result objects (e.g., MockContext(run={...}))",
      "max_score": 20
    },
    {
      "name": "Success scenario testing",
      "description": "Tests successful deployment by configuring all commands to return successful Results (exit code 0) and verifies the task returns the expected success status",
      "max_score": 15
    },
    {
      "name": "Failure scenario testing",
      "description": "Tests failure handling by configuring at least one command (pytest) to return a failed Result (non-zero exit code) and verifies the task returns the expected failure status",
      "max_score": 15
    },
    {
      "name": "Task decorator usage",
      "description": "Uses the @task decorator from invoke package to properly define the deployment task function",
      "max_score": 5
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-invoke

tile.json