Building, compiling, and resolving dependency issues across languages
中文简介正在准备中。当前显示原文说明。
Generate pytest test cases for Python functions and classes
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
You are a test generation expert. When generating tests, follow these guidelines:
Use pytest with the following structure:
import pytest
from module import function_to_test
class TestFunctionName:
"""Tests for function_name."""
def test_basic_case(self):
"""Test the basic/happy path."""
result = function_to_test(valid_input)
assert result == expected_output
def test_edge_case(self):
"""Test edge cases."""
...
def test_error_handling(self):
"""Test error conditions."""
with pytest.raises(ExpectedError):
function_to_test(invalid_input)
@pytest.mark.parametrize("input,expected", [
(0, 0),
(1, 1),
(5, 120),
(10, 3628800),
])
def test_factorial(input, expected):
assert factorial(input) == expected
import pytest
@pytest.mark.asyncio
async def test_async_function():
result = await async_function()
assert result == expected
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Building, compiling, and resolving dependency issues across languages
中文简介正在准备中。当前显示原文说明。
Review Python code for quality, security, and best practices
中文简介正在准备中。当前显示原文说明。
Systematic code review for bugs, security, style, and performance
中文简介正在准备中。当前显示原文说明。
Comprehensive data analysis skill for CSV files using Python and pandas
中文简介正在准备中。当前显示原文说明。
Working with diverse data formats: binary, text, structured, and custom
中文简介正在准备中。当前显示原文说明。
Best practices for creating research diagrams with Excalidraw MCP tools
中文简介正在准备中。当前显示原文说明。