An idiomatic testing library for python with powerful and flexible assertions, created by Gabriel Falcão. Sure’s developer experience is inspired and modeled after RSpec Expectations and should.js.
Installing
$ pip install sure
Documentation
Available in the website or under the docs directory.
You can also build the documentation locally using sphinx:
make docs
Here is a tease
Equality
(number).should.equal(number)
import sure
(4).should.be.equal(2 + 2)
(7.5).should.eql(3.5 + 4)
(3).shouldnt.be.equal(5)
Assert dictionary and its contents
{'foo': 'bar'}.should.equal({'foo': 'bar'})
{'foo': 'bar'}.should.have.key('foo').which.should.equal('bar')
“A string”.lower().should.equal(“a string”) also works
"Awesome ASSERTIONS".lower().split().should.equal(['awesome', 'assertions'])
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
surer-0.0.1.tar.gz
(47.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
surer-0.0.1-py3-none-any.whl
(35.5 kB
view details)
File details
Details for the file surer-0.0.1.tar.gz.
File metadata
- Download URL: surer-0.0.1.tar.gz
- Upload date:
- Size: 47.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6fdd18798ba9e9c2119b7bbae83cbee4d63cf078cde2e55312e2826d90132cc
|
|
| MD5 |
7dcc64a09561517f0f5ded9fa8657cdb
|
|
| BLAKE2b-256 |
13b76a7af034c2ac5532e8d8e1c33bae3127c2d59870b39295d4537587c1ee59
|
File details
Details for the file surer-0.0.1-py3-none-any.whl.
File metadata
- Download URL: surer-0.0.1-py3-none-any.whl
- Upload date:
- Size: 35.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.11.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0d778c254677d37b8f6366d668276c70487c81281879d30a675f037364e522c
|
|
| MD5 |
1520ad28b619e62448c2f5474e26a800
|
|
| BLAKE2b-256 |
7965064a5710516926e3a988b720a1416715cfef96103284b86961c32d836a86
|