pytest testing patterns for Python. Triggers on: pytest, fixture, mark, parametrize, mock, conftest, test coverage, unit test, integration test, pytest.raises.
84
86%
Does it follow best practices?
Impact
68%
0.95xAverage score across 3 eval scenarios
Passed
No known issues
Parametrize and exception testing
Parametrize usage
100%
100%
Parametrize case count
100%
100%
Stacked parametrize
0%
0%
pytest.raises context manager
100%
100%
match= parameter
0%
100%
exc_info.value inspection
100%
0%
No bare try/except for exceptions
100%
100%
xfail marker
0%
0%
skip or skipif marker
0%
0%
Multiple exception types tested
100%
100%
conftest.py and fixture scopes
conftest.py exists
100%
100%
Session or module scope
100%
100%
yield-based teardown
100%
100%
Teardown after yield
100%
100%
Multiple fixture scopes
100%
100%
Custom marker registered
100%
100%
Custom marker applied
100%
100%
Fixture injection by name
100%
100%
conftest shared across files
100%
100%
pytest-mock mocker fixture preference
mocker.patch used
0%
0%
No @patch decorator
100%
0%
No unittest.mock import
0%
0%
mocker injected as parameter
0%
0%
return_value set on mock
100%
100%
Mock call assertion
100%
100%
Error path mocked
100%
100%
Correct patch target
100%
100%
f772de4
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.