| name | vcsdd-language-python |
| description | Use this skill when applying VCSDD to Python projects. Provides hypothesis property testing patterns, mutmut mutation testing, and pytest integration for the VCSDD pipeline. |
| origin | VCSDD |
VCSDD Language Profile: Python
Verification Toolset
| Tier | Tool | Install | Use Case |
|---|
| 1 | hypothesis | pip install hypothesis | Property-based testing |
| 1 | mutmut | pip install mutmut | Mutation testing |
| 1 | pytest-cov | pip install pytest-cov | Coverage reporting |
Hypothesis Pattern
from hypothesis import given, settings, strategies as st
from hypothesis import HealthCheck
@given(st.text(min_size=0, max_size=1000))
@settings(max_examples=500, suppress_health_check=[HealthCheck.too_slow])
def test_parse_never_raises_on_arbitrary_input(s: str):
"""Parse should never panic - it should return a Result."""
try:
result = parse(s)
if result is not None:
assert serialize(result) == s
except ParseError:
pass
@given(st.from_regex(r'[a-z]{1,20}'))
def test_parse_valid_input(s: str):
result = parse(s)
assert result is not None
assert serialize(result) == s
mutmut Setup
mutmut run --paths-to-mutate src/
mutmut results
mutmut show <mutation_id>
mutmut html
Red Phase Evidence
pytest tests/ -v 2>&1 | tee .vcsdd/features/<name>/evidence/sprint-1-red-phase.log
grep -q "FAILED" .vcsdd/features/<name>/evidence/sprint-1-red-phase.log