{"categories":[{"label":"Testing","url":"https://skillfed.io/packages/category/software-development-testing/5"}],"enrichment":{"capability":"A pytest plugin that copies specified files and directories into a temporary directory before each test, ensuring test isolation without modifying original files.","skillfed_tags":["pytest-plugin","test-fixtures","file-isolation"],"use_cases":["Testing video or image processing code on large files stored outside the test suite without modifying originals","Running multiple tests on the same fixture files while ensuring each test gets an independent copy","Verifying file I/O and modification logic in isolation, with automatic cleanup after each test","Setting up complex directory structures for integration tests that need realistic file layouts","Testing file-based tools or utilities where you need to confirm they don't corrupt the input data"],"what_it_does":"pytest-datafiles is a pytest plugin that automates the setup of test data by copying files and directories into a temporary directory before each test runs. You decorate a test function with @pytest.mark.datafiles() and list the files or directories you want copied, then receive a pathlib.Path object pointing to the temporary copy. This keeps your original test data untouched across test runs and ensures each test works on its own isolated copy.\n\nThe plugin is useful when tests need to read or modify files without side effects\u2014common scenarios include testing on large media files, image processing, or any workflow where you want to verify file handling without corrupting your test fixtures. It supports both string paths and pathlib.Path objects, offers options to control directory nesting and duplicate file handling, and integrates seamlessly into pytest's fixture and marker system.","worth_installing":"Yes. This is a stable, low-friction plugin (pure Python, only pytest dependency) with active maintenance and no known vulnerabilities. It solves a common testing problem\u2014data isolation\u2014cleanly and has been proven in production since 2015. Install it if your tests work with files and you want to avoid fixture pollution or manual cleanup."},"id":"pytest-datafiles","links":{"html":"https://skillfed.io/packages/pytest-datafiles","md":"https://skillfed.io/packages/pytest-datafiles.md","pypi":"https://pypi.org/project/pytest-datafiles/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-01-04","license_spdx":"MIT","license_treatment":"permissive","name":"pytest-datafiles","python_support":"supports_current","summary":"py.test plugin to create a 'tmp_path' containing predefined files/directories."},"popularity":{"monthly_downloads":123874,"position":11893,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"3.0.1"}
