sure
utility belt for automated testing in python for python
What it is and what it does
sure is a testing assertion library that layers fluent, chainable syntax on top of Python's standard testing capabilities. Instead of writing `assert x == y`, you write `x.should.equal(y)`, building readable test expressions that flow more like natural language. The library is modeled after RSpec Expectations and should.js, bringing that idiom to Python.
It supports assertions on numbers, strings, dictionaries, and collections, with methods like `.should.equal()`, `.should.have.key()`, and `.shouldnt.be.equal()` that chain together to form readable test conditions. The package has no runtime dependencies and works across Python 3.6, 3.7, 3.8, 3.9, 3.10, and 3.11 on CPython and PyPy, though maintenance status is aging.
Use it for:
- Writing unit tests with more readable, expressive assertion chains instead of bare assert statements.
- Validating dictionary structure and content in integration tests using `.should.have.key()` chains.
- Testing string transformations and comparisons using fluent syntax (e.g., `'HELLO'.lower().should.equal('hello')`).
- Building test suites where assertion readability and developer experience are priorities.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
sure provides fluent, chainable assertion syntax for Python testing, letting you write test conditions that read like natural language (e.g., `(4).should.equal(2 + 2)`).
Yes, with conditions. sure is stable and has no known vulnerabilities, making it safe to adopt. However, high install friction (source-only distribution) and aging maintenance mean it's best suited for projects where readable test syntax is a priority and you're comfortable with a library that receives infrequent updates. The GPLv3+ copyleft license requires careful review if your project uses a different license.
Install
sure on PyPI
pip
pip install sureuv
uv add surepoetry
poetry add sureInstalling sure
Before you install
Installation friction is high: the package ships as a source distribution with no prebuilt wheels. Last release was over a year ago and maintenance status is aging, though the repository remains active with recent commits and the codebase is marked Production/Stable.
License in practice
sure is licensed under GPLv3+, a copyleft license. Any code that imports sure into a proprietary or differently-licensed project may face licensing compliance obligations; review your project's license compatibility before adopting.
Quickstart
pip install sure
import sure
(4).should.equal(2 + 2)
{'foo': 'bar'}.should.have.key('foo')
Verify before relying
- Whether sure integrates cleanly with modern test runners (pytest, unittest) or requires special configuration.
- Performance characteristics when chaining many assertions in large test suites.
- Compatibility with type checkers (mypy, pyright) given the dynamic attribute-chaining syntax.
- Current maintenance roadmap and likelihood of future updates beyond the 2023-02-06 release.
Package facts
| License | not declared (copyleft) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | none |
| Maintenance | aging — 1,285 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 348,843/month — #7,338 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sure-2.0.1.tar.gz
Tags
More Testing packages
Pluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
virtualenvvirtualenv creates isolated Python environments…
permissive · top 100 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
pytest-asynciopytest-asyncio is a pytest plugin that enables…
permissive · top 1,000 on PyPI
pytest-json-ctrfA pytest plugin that generates test reports in…
permissive · top 1,000 on PyPI
assertpyProvides a fluent assertion API for writing…
permissive · top 5,000 on PyPI
ensureensure provides literate assertion helpers for…
permissive · top 5,000 on PyPI
surerSurer provides fluent, RSpec-inspired assertion…
permissive · top 15,000 on PyPI
expectsExpects is an assertion library for TDD/BDD…
permissive · top 15,000 on PyPI
expecttestexpecttest implements inline golden tests where…
permissive · top 5,000 on PyPI
re-assertProvides a helper class for regex assertions…
permissive · top 15,000 on PyPI
robotframework-assertion-engineProvides a standardized assertion engine for…
permissive · top 15,000 on PyPI
assertsProvides stand-alone assertion functions for…
unclear · top 15,000 on PyPI
PyHamcrestPyHamcrest provides a framework for writing…
permissive · top 5,000 on PyPI
delayed-assertCollects multiple assertion failures in a test…
unclear · top 15,000 on PyPI