Comparison
ddt vs parameterized vs testscenarios vs unittest-parametrize
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Data-Driven/Decorated Tests
Low maintenance activity. Last release over 2 years ago, commits in 1 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install ddtParameterized testing with any Python test framework
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install parameterizedTestscenarios, a unittest extension for dependency injection
Maintained. Last release 3 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity.
pip install testscenariosParametrize tests within unittest TestCases.
Actively maintained. Last release 3 months ago, commits in 12 of the last 26 weeks. A safe choice.
pip install unittest-parametrizeIn short
- parameterized is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- ddt is the most used: 1.3M downloads a month.
- unittest-parametrize is better maintained: Pythie’s Index 71 against 27.
- ddt is growing fastest: downloads +25% over the last month.
Side by side
| Metric | ddt | parameterized | testscenarios | unittest-parametrize |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 27 | 14 |