{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing"}],"enrichment":{"capability":"Testfixtures provides helpers and mock objects for writing unit and integration tests, including comparison utilities, object replacement, datetime mocking, subprocess testing, logging capture, and file/directory sandboxing.","skillfed_tags":["mocking","test-utilities","assertions"],"use_cases":["Assert equality on complex nested data structures with clear, readable diffs when tests fail.","Swap out methods or objects during a test and verify they were called correctly without manual restoration.","Test code that depends on the current date or time by mocking datetime and time APIs to a fixed point.","Capture and verify log messages from your code, including from loguru and structlog libraries.","Test subprocess-based code by mocking Popen without spawning real processes.","Verify command-line scripts work correctly end-to-end, checking output, logging, and return codes."],"what_it_does":"Testfixtures is a mature testing utility library that bundles helpers and mock objects to simplify common testing scenarios in Python. It provides tools for asserting equality with readable diffs on nested structures, replacing objects and methods during tests, mocking datetime/time APIs, testing subprocesses and command-line scripts, capturing logs and stream output, working with temporary files and directories, and checking exceptions and warnings.\n\nThe package is designed to integrate into your test suite with minimal setup\u2014you import the specific helpers you need and use them directly in your tests. It has no heavy dependencies beyond typing-extensions and requires Python 3.11 or later. The library covers both general testing needs and specialized scenarios like Django model comparison and Twisted logging assertions.","worth_installing":"Yes. Testfixtures is a stable, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves multiple common testing problems with a cohesive API and is widely used (top 5000 PyPI packages). Install it if your test suite needs readable comparisons, object mocking, datetime control, or subprocess/logging verification."},"id":"testfixtures","links":{"html":"https://skillfed.io/packages/testfixtures","md":"https://skillfed.io/packages/testfixtures.md","pypi":"https://pypi.org/project/testfixtures/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-08","license_spdx":null,"license_treatment":"permissive","name":"testfixtures","python_support":"supports_current","summary":"A collection of helpers and mock objects for unit tests and doc tests."},"popularity":{"monthly_downloads":3405022,"position":2632,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"12.3.0"}
