Pythonic task execution library for managing shell-oriented subprocesses and organizing executable Python code into CLI-invokable tasks
Overall
score
96%
Build a deployment task with a test suite that verifies task behavior without executing actual shell commands.
Create a deployment task that executes these commands in sequence:
git status - Check repository statuspytest - Run test suitepython setup.py build - Build the application./deploy.sh - Deploy to productionThe task should return a dictionary with a "status" key indicating success or failure.
Your test suite must verify the task behavior using mocked command execution:
{"status": "deployed"} @test{"status": "tests_failed"} @test@generates
from invoke import task
@task
def deploy(c, environment="production"):
"""
Deploy the application to the specified environment.
Args:
c: Context object for running commands
environment: Target deployment environment
Returns:
dict: Deployment report with status information
"""
passProvides task execution and testing support.
Install with Tessl CLI
npx tessl i tessl/pypi-invokedocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10