Comparison
pytest-datadir vs pytest-datafiles vs pytest-variables 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 plugin for providing variables to tests/fixtures
Low maintenance activity. Last release over 2 years ago, commits in 4 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install pytest-variablesPytest 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, 2.7× more than pytest-variables.
- pytest-datafiles is better maintained: Pythie’s Index 64 against 49.
Side by side
| Metric | pytest-datadir | pytest-datafiles | pytest-variables | pytest-xfiles |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 49 | 64 |