{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/3"},{"label":"Quality Assurance","url":"https://skillfed.io/packages/category/software-development-quality-assurance/2"}],"enrichment":{"capability":"testresources extends unittest to manage expensive shared test resources\u2014like databases or web servers\u2014across multiple test cases, reusing them when clean and tearing them down when dirty to optimize test execution time.","skillfed_tags":["test-optimization","resource-pooling"],"use_cases":["Optimize test suites that need expensive setup like database instances or VCS working trees by reusing clean resources across tests","Manage temporary directories or file systems for integration tests while tracking whether they've been modified","Pool shared web servers or network services across multiple test cases to reduce test execution time","Declare resource dependencies between test fixtures so that dependent resources are allocated in the correct order","Adapt existing resource-like classes or fixtures.Fixture instances to work with testresources via GenericResource or FixtureResource"],"what_it_does":"testresources is a unittest extension that manages the lifecycle of expensive shared test resources\u2014such as temporary databases, working directories, or running servers\u2014across multiple test cases. Instead of creating and destroying these resources for every test, testresources tracks whether a resource is clean (reusable) or dirty (modified), allowing the test suite to reuse clean instances and minimize setup/teardown overhead. You declare resources your test needs via a resources attribute, and testresources automatically allocates them before setUp and disposes or recycles them after tearDown.\n\nThe package provides a TestResourceManager base class for defining custom resources, a ResourcedTestCase mixin to inject resources into test cases, and an OptimisingTestSuite that reorders tests to minimize resource churn. It has no runtime dependencies and supports modern Python versions (3.10\u20133.14) and PyPy. The dual Apache-2.0/BSD license is permissive, and the codebase is mature and actively maintained.","worth_installing":"Yes, if your test suite has expensive setup costs (databases, servers, large file systems) that you want to reuse across tests. The low install friction, permissive license, active maintenance, and mature codebase make it a safe choice. Not necessary for simple unit tests with lightweight setup\u2014use it when resource reuse would materially reduce test execution time."},"id":"testresources","links":{"html":"https://skillfed.io/packages/testresources","md":"https://skillfed.io/packages/testresources.md","pypi":"https://pypi.org/project/testresources/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-21","license_spdx":null,"license_treatment":"permissive","name":"testresources","python_support":"supports_current","summary":"Testresources, a pyunit extension for managing expensive test resources"},"popularity":{"monthly_downloads":473383,"position":6464,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.1.2"}
