使用pytest、TDD方法、夹具、模拟、参数化和覆盖率要求的Python测试策略。
55
45%
Does it follow best practices?
Impact
56%
1.18xAverage score across 3 eval scenarios
Passed
No known issues
Optimize this skill with Tessl
npx tessl skill review --optimize ./docs/zh-CN/skills/python-testing/SKILL.mdTDD workflow and pytest configuration
Coverage in addopts
100%
100%
HTML coverage report
0%
0%
testpaths configured
100%
100%
python_files and python_functions
0%
100%
Markers section defined
0%
100%
Custom marker applied
0%
0%
TDD process documented
13%
0%
pytest.raises used
0%
0%
Descriptive test names
75%
100%
Coverage ≥ 80%
100%
100%
Fixtures, parametrize, and mocking patterns
parametrize used
100%
100%
parametrize ids
0%
0%
yield in fixture
0%
0%
conftest.py has shared fixture
100%
100%
Non-default fixture scope
0%
0%
autouse fixture
0%
100%
pytest.raises with match
100%
100%
autospec mock
0%
0%
Test class grouping
100%
100%
Independent tests
100%
100%
Async testing with pytest-asyncio
@pytest.mark.asyncio used
100%
100%
Async fixture defined
0%
0%
assert_awaited_once used
0%
0%
External calls mocked
100%
100%
pytest.raises in async context
100%
100%
PropertyMock for property
0%
0%
autospec in patch
0%
0%
Descriptive async test names
100%
100%
side_effect for error simulation
100%
100%
ae2cadd
Table of Contents
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.