Comparison
pytest-datadir vs pytest-datafiles vs pytest-xfiles
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
pytest plugin for test data directories and files
Maintained. Last release 4 weeks ago, commits in 2 of the last 26 weeks. Weaker on commit activity and release cadence.
pip install pytest-datadirpy.test plugin to create a 'tmp_path' containing predefined files/directories.
Maintained. Last release 11 months ago, commits in 12 of the last 26 weeks. Weaker on release cadence and security practices.
pip install pytest-datafilesPytest fixtures providing data read from function, module or package related (x)files.
Likely abandoned. No release or commit for years (last release over 8 years ago).
pip install pytest-xfilesIn short
- pytest-xfiles looks abandoned: avoid it for new projects.
- pytest-datadir is the most used: 1.8M downloads a month, 20× more than pytest-xfiles.
- pytest-datafiles is better maintained: Pythie’s Index 64 against 49.
Side by side
| Metric | pytest-datadir | pytest-datafiles | pytest-xfiles |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 49 | 64 |