utility belt for automated testing in python for python
Project description
An idiomatic testing library for python with powerful and flexible assertions. Sure is heavily inspired in 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'])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sure-1.4.8.tar.gz
(45.1 kB
view details)
Built Distributions
sure-1.4.8-py3-none-any.whl
(22.9 kB
view details)
sure-1.4.8-py2-none-any.whl
(22.9 kB
view details)
File details
Details for the file sure-1.4.8.tar.gz
.
File metadata
- Download URL: sure-1.4.8.tar.gz
- Upload date:
- Size: 45.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb116a525124d7d58e19ced083177c6496592bd4b2e9852f3c9bdfad6ce53c28 |
|
MD5 | 271cc1e9c8afc558117c8f7f93d8ff3b |
|
BLAKE2b-256 | f045cb50e00cd2ae6755ec219f22ad4ed0c4759a4750ab8491ff5316810abde8 |
Provenance
File details
Details for the file sure-1.4.8-py3-none-any.whl
.
File metadata
- Download URL: sure-1.4.8-py3-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7028da2a7575540b64595a7efe1f5b709637cd7d69f72a08e9ec4ee2270da5b1 |
|
MD5 | 5a635cccf232f7342fe0c7ba39c19ea1 |
|
BLAKE2b-256 | 053fc15e203e0a4f55f9060c205891412eb56b58e43ce5dd76f85487a55f71a3 |
Provenance
File details
Details for the file sure-1.4.8-py2-none-any.whl
.
File metadata
- Download URL: sure-1.4.8-py2-none-any.whl
- Upload date:
- Size: 22.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f433a467069445c876de9ac8ca41a0c4b90256e87e3696af9f04a971df92ffa |
|
MD5 | 0469b1660e4474af7f8e94ca7e866d85 |
|
BLAKE2b-256 | fc4f5a6f69f69867113430e5892c66b11767f16707f0c82acbf3bc9d474d2312 |