cyberneticlibrary

Write and test Python with pytest

python-testingskillsetup L10
Sheshiyer/skill-clusters
What it does

Write and run pytest test suites following TDD workflow

Best for

Building regression test suites that catch regressions before commit via deterministic TDD cycles

Inputs
  • · Python source code
  • · test specifications
Outputs
  • · pytest results
  • · coverage reports
Requires
  • · pytest
  • · pytest-cov
Preconditions

Python 3.6+, pytest installed

Failure modes
  • · Flaky tests due to shared state
  • · Coverage measurement missing real code paths
  • · Slow test suite
Trust signals
  • · 80%+ code coverage target
  • · Red-green-refactor discipline
  • · Fixture scope documentation