Generate Python Runnability Test

> Generates a lightweight `tests/test_runnability.py` for a Python recipe. The test just imports the recipe's agent module and asserts that `root_agent is not None` (and `app is not None` if the module defines one). The skill parses agent.py with `ast` to figure out which import-time side effects need mocking (`vertexai.init`, `google.auth.default`) and which env vars need setting (`GOOGLE_CLOUD_PROJECT`, `INTEGRATION_TEST`), and only emits the boilerplate the recipe actually needs. Runs in dry-run (report + preview) and apply (write to disk) modes. Use when the user wants to "add a runnability test", "generate test_runnability.py", "create a smoke test for the recipe", or fix the missing-required-file failure from `python-validate-recipe.yml`.

thedixitjain a95a022 2 files · 41.3 KB Updated 2 repo stars

File contents

thedixitjain/the-mega-skill-library/tree/main/library/testing-and-qa/generate-python-runnability-test commit a95a02242b

Frequently asked questions

npx skillmds add thedixitjain/generate-python-runnability-test