Pytest Fixture Generator Best Practices

Sub-skill of pytest-fixture-generator: Best Practices.

vamseeachanta Updated

File contents

Best Practices

Best Practices

  1. Use markers consistently - All tests should have at least one marker
  2. Minimize fixture scope - Use function scope unless sharing is needed
  3. Keep fixtures focused - One purpose per fixture
  4. Document fixtures - Add docstrings explaining usage
  5. Use tmp_path - For temporary files (auto-cleaned)

vamseeachanta/workspace-hub/tree/main/.agents/skills/_archive/development/testing/pytest-fixture-generator/best-practices commit a385143336

Frequently asked questions

npx skillmds@latest add vamseeachanta/pytest-fixture-generator-best-practices