Comparison
assertpy vs ensure vs expects vs sure
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
Fluent, fully typed assertion library for Python: your type checker sees only the assertions that fit the value, and every failure carries a structured diff. Soft assertions, polling, inline snapshots, OpenAPI contracts.
Actively maintained. Last release 2 weeks ago, commits in 26 of the last 26 weeks. A safe choice.
pip install assertpyLiterate BDD assertions in Python with no magic
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install ensureExpressive and extensible TDD/BDD assertion library for Python
Likely abandoned. No release or commit for years (last release over 8 years ago).
pip install expectsutility belt for automated testing in python for python
Low maintenance activity. Last release over 2 years ago, commits in 0 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install sureIn short
- ensure is slowing down (last release over 2 years ago): fine for existing code, risky for a new project.
- expects looks abandoned: avoid it for new projects.
- assertpy is the most used: 1.1M downloads a month, 4.4× more than expects.
- assertpy also has the best Pythie’s Index (72).
- assertpy is growing fastest: downloads +13% over the last month.
- Safe default for a new project: assertpy.