{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/2"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"}],"enrichment":{"capability":"Provides a reusable fixture contract for unit testing that manages setup, cleanup, and state composition without requiring test class hierarchies.","skillfed_tags":["testing-framework","test-fixtures","unittest-utilities"],"use_cases":["Write reusable test fixtures that manage temporary resources (files, databases, servers) without polluting test class hierarchies.","Compose complex test state from multiple simpler fixtures using useFixture, keeping each fixture focused and independently testable.","Adapt existing setup/teardown functions or object methods into the Fixture contract using FunctionFixture or MethodFixture.","Ensure deterministic cleanup of test resources even when multiple cleanups fail, via the MultipleExceptions wrapper.","Share expensive fixtures across test cases using reset() to efficiently reinitialize state without full teardown and setup."],"what_it_does":"Fixtures is a testing library that defines a contract for reusable state and support logic in unit tests. Rather than accumulating helper methods on test classes (which scales poorly and pollutes class hierarchies), fixtures lets you write standalone, composable objects that manage their own setup and cleanup. Each fixture subclasses the base Fixture class, defines _setUp to initialize state, and schedules cleanups via addCleanup; when cleanUp is called, all scheduled cleanups run in reverse order.\n\nThe library includes glue code for unittest integration via TestWithFixtures, which provides a useFixture method that automatically calls setUp, schedules cleanup, and returns the fixture. Fixtures can be composed using useFixture within other fixtures, adapted from functions via FunctionFixture, or combined with CompoundFixture. The package supports context managers and exposes diagnostic details via the testtools content API. It has no runtime dependencies and works with Python 3.10 and later.","worth_installing":"Yes. Fixtures is a mature, actively maintained library with zero security issues, low install friction, and permissive dual licensing. It solves a real problem in test organization\u2014avoiding helper method sprawl on test classes\u2014and integrates cleanly with unittest. Install it if you write unit tests and want cleaner, more reusable test state management."},"id":"fixtures","links":{"html":"https://skillfed.io/packages/fixtures","md":"https://skillfed.io/packages/fixtures.md","pypi":"https://pypi.org/project/fixtures/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-03-25","license_spdx":null,"license_treatment":"permissive","name":"fixtures","python_support":"supports_current","summary":"Fixtures, reusable state for writing clean tests and more."},"popularity":{"monthly_downloads":737050,"position":5190,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"4.3.2"}
