Skip to main content
Glama
by microsoft
generate-python-tests.genai.js1.02 kB
script({ title: "Generate python tests", description: "Given a task and code, generate tests", group: "hello world", system: ["system", "system.explanations", "system.files", "system.python"], temperature: 0, }) const spec = env.files.find((f) => f.filename.endsWith(".md")) def( "TESTS", env.files.filter((f) => /^test_*\.py$/.test(f.filename)) ) def("TASK", spec) def( "CODE", env.files.filter( (f) => f.filename.endsWith(".py") && !f.filename.startsWith("test_") ) ) $`Python has been written for the task in TASK. The code is in CODE. Generate 5 tests for the code in CODE in a separate file. Do not modify or duplicate the code in CODE. If the tests are already present in TESTS, ensure that the tests match the description in TASK and the code in CODE. If they do not, update the tests to match the code and the description. Use this format for test file names: "test_*.py". Include the unittest test harness that can run the tests from the command line.`

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/microsoft/genaiscript'

If you have feedback or need assistance with the MCP directory API, please join our Discord server