{"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"}],"enrichment":{"capability":"A pytest plugin that provides fixtures for safely accessing test data files organized in module-specific or shared directories, automatically copying them to temporary locations during test runs.","skillfed_tags":["pytest-plugin","test-fixtures","file-handling"],"use_cases":["Load fixture files (JSON, CSV, XML) in unit tests without modifying originals or managing temporary cleanup.","Share common test data across multiple test modules via a global data directory.","Test file I/O operations safely by working with isolated copies that don't affect the source data.","Reduce test setup boilerplate by automatically discovering and preparing test data based on directory naming conventions.","Optimize test performance with lazy_datadir when only a subset of test data files are needed per test."],"what_it_does":"pytest-datadir is a pytest plugin that simplifies working with test data by providing fixtures that automatically locate and manage test data files. It supports two organizational patterns: module-specific data directories (named to match your test module) and a shared global data folder. The plugin copies data to temporary locations during test execution, ensuring test isolation and preventing accidental modifications to original files.\n\nThe package offers three main fixtures: datadir for module-specific data, shared_datadir for global test data, and lazy variants (lazy_datadir and lazy_shared_datadir) that defer copying until files are actually accessed. All fixtures return pathlib.Path objects, making file operations straightforward. It requires Python 3.8 or later and integrates seamlessly into existing pytest workflows.","worth_installing":"Yes. This is a stable, well-maintained plugin (active since 2015, currently at version 1.8.0) with no security vulnerabilities, low install friction, and a clear, focused purpose. If your test suite uses file-based fixtures, it eliminates manual directory management and temporary file cleanup, making tests cleaner and safer. The permissive MIT license poses no restrictions."},"id":"pytest-datadir","links":{"html":"https://skillfed.io/packages/pytest-datadir","md":"https://skillfed.io/packages/pytest-datadir.md","pypi":"https://pypi.org/project/pytest-datadir/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2025-07-30","license_spdx":null,"license_treatment":"permissive","name":"pytest-datadir","python_support":"supports_current","summary":"pytest plugin for test data directories and files"},"popularity":{"monthly_downloads":1767458,"position":3576,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"1.8.0"}
